@@ -166,24 +166,10 @@ module CloudController
166166 ) . once
167167 end
168168
169- it 'does not immediately set the state to SYNCHRONIZING' do
169+ it 'sets the state to SYNCHRONIZING' do
170170 action . enqueue_update
171171
172- expect ( existing_service_broker . state ) . to eq ( ServiceBrokerStateEnum ::AVAILABLE )
173- end
174-
175- it 'sets the state to SYNCHRONIZING when the job runs' do
176- action . enqueue_update
177-
178- broker_state_during_execution = nil
179- allow_any_instance_of ( VCAP ::CloudController ::V3 ::ServiceBrokerCatalogUpdater ) . to receive ( :refresh ) do
180- broker_state_during_execution = existing_service_broker . reload . state
181- nil
182- end
183-
184- execute_all_jobs ( expected_successes : 1 , expected_failures : 0 )
185- expect ( broker_state_during_execution ) . to eq ( ServiceBrokerStateEnum ::SYNCHRONIZING )
186- expect ( existing_service_broker . reload . state ) . to eq ( ServiceBrokerStateEnum ::AVAILABLE )
172+ expect ( existing_service_broker . state ) . to eq ( ServiceBrokerStateEnum ::SYNCHRONIZING )
187173 end
188174
189175 it 'creates an audit event' do
@@ -251,24 +237,10 @@ module CloudController
251237 context 'legacy service brokers' do
252238 let! ( :state ) { '' } # broker creating from V2 endpoint will not have a state
253239
254- it 'does not immediately set the state to SYNCHRONIZING' do
240+ it 'sets the state to SYNCHRONIZING' do
255241 action . enqueue_update
256242
257- expect ( existing_service_broker . reload . state ) . to eq ( '' )
258- end
259-
260- it 'sets the state to SYNCHRONIZING when the job runs' do
261- action . enqueue_update
262-
263- broker_state_during_execution = nil
264- allow_any_instance_of ( VCAP ::CloudController ::V3 ::ServiceBrokerCatalogUpdater ) . to receive ( :refresh ) do
265- broker_state_during_execution = existing_service_broker . reload . state
266- nil
267- end
268-
269- execute_all_jobs ( expected_successes : 1 , expected_failures : 0 )
270- expect ( broker_state_during_execution ) . to eq ( ServiceBrokerStateEnum ::SYNCHRONIZING )
271- expect ( existing_service_broker . reload . state ) . to eq ( ServiceBrokerStateEnum ::AVAILABLE )
243+ expect ( existing_service_broker . reload . state ) . to eq ( ServiceBrokerStateEnum ::SYNCHRONIZING )
272244 end
273245
274246 it 'creates and returns a synchronization job' do
0 commit comments