File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -597,7 +597,13 @@ func TestSessionsProse(t *testing.T) {
597597 })
598598 */
599599
600+ firstServerAddr := mtest .GlobalTopology ().Description ().Servers [0 ].Addr
601+ directConnectionOpts := options .Client ().
602+ ApplyURI (fmt .Sprintf ("mongodb://%s" , firstServerAddr )).
603+ SetReadPreference (readpref .Primary ()).
604+ SetDirect (true )
600605 pingOpts := mtest .NewOptions ().
606+ ClientOptions (directConnectionOpts ).
601607 CreateCollection (false ).
602608 Topologies (mtest .ReplicaSet ) // Read preference isn't sent to standalones so we can test on replica sets.
603609 mt .RunOpts ("ping test" , pingOpts , func (mt * mtest.T ) {
@@ -622,7 +628,6 @@ func TestSessionsProse(t *testing.T) {
622628 firstServerAddr := mtest .GlobalTopology ().Description ().Servers [0 ].Addr
623629 opts := options .Client ().
624630 ApplyURI (fmt .Sprintf ("mongodb://%s" , firstServerAddr )).
625- SetHeartbeatInterval (500 * time .Millisecond ). // Minimum interval
626631 SetReadPreference (readpref .Primary ()).
627632 SetDirect (true ).
628633 SetHeartbeatInterval (500 * time .Millisecond ). // Minimum interval
You can’t perform that action at this time.
0 commit comments