SERVER-133231ClosedFixed

Fix read_pref_cmd.js to wait for replica set before running profile

BF-45277 — read_pref_cmd.js: profile entry lost on a lagged secondary after dropDatabase/re-create Mechanism. The test loops: setUp() → testCursorReadPreference() / testConnReadPreference() → tearDown(). tearDown() drops read_pref_cmd and waits for replication; the next setUp() re-creates the database via enableSharding + shardCollection on the primary. Those are majority writes, so in a 3-node set they return as soon as the primary and one secondary ack — the third node can still be behind.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.0.48.3.168.0.37
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
bkp