[| client topologyUpdates serverUpdates initialClockValue loggingBlock | client := MongoSDAMClient withUrls: { MongoReplicationTestResources mongoUrlA }. " Subscribe " topologyUpdates := SharedQueue new. client announcer when: MongoSDAMTopologyUpdate send: #nextPut: to: topologyUpdates. serverUpdates := SharedQueue new. client announcer when: MongoSDAMServerDescriptionUpdate send: #nextPut: to: serverUpdates. initialClockValue := Time millisecondClockValue. loggingBlock := [ :each | { each. Time millisecondClockValue - initialClockValue. client topology type. client topology primaryUrlString. topologyUpdates size } printElementsOn: Transcript. Transcript cr; flush. 250 milliSeconds wait ]. client crisisStateFrequency: 500 milliSeconds. client steadyStateFrequency: 5 seconds. client start. 1 to: 80 do: loggingBlock. Transcript show: ' -- Step down primary -- '. MongoReplicationTestResources stepDownA: 10 seconds. 81 to: 190 do: loggingBlock. client stop. Transcript show: ' Topology updates: '. topologyUpdates contents select: #hasRelevantChanges thenDo: [:each | Transcript show: '* '. each printOn: Transcript. Transcript show: ': '. each printRelevantChangesOn: Transcript. Transcript cr; flush ]. Transcript show: ' Server updates: '. serverUpdates contents select: #hasRelevantChanges thenDo: [:each | Transcript show: '* '. each printOn: Transcript. Transcript show: ': '. each printRelevantChangesOn: Transcript. Transcript cr; flush ]. ] fork.