diff --git a/spec/request/lifecycle/service_brokers_spec.rb b/spec/request/lifecycle/service_brokers_spec.rb index 4c37ac2bf44..754f66d2ab9 100644 --- a/spec/request/lifecycle/service_brokers_spec.rb +++ b/spec/request/lifecycle/service_brokers_spec.rb @@ -151,6 +151,10 @@ stub_request(:get, 'http://example.org/my-service-broker-url/v2/catalog'). with(basic_auth: %w[admin password]). to_return(status: 200, body: catalog, headers: {}) + + # Both jobs may be enqueued with the same timestamp, making pickup order non-deterministic. + # Give the delete job a higher priority number so the create job always runs first. + TestConfig.config[:jobs][:priorities] = { 'service_broker.delete': 10 } end it 'allows deletion during creation' do