File tree Expand file tree Collapse file tree
spec/server-selection/server_selection/ReplicaSetWithPrimary/read Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "topology_description" : {
3+ "type" : " ReplicaSetWithPrimary" ,
4+ "servers" : [
5+ {
6+ "address" : " a:27017" ,
7+ "avg_rtt_ms" : 5 ,
8+ "type" : " RSPrimary"
9+ },
10+ {
11+ "address" : " b:27017" ,
12+ "avg_rtt_ms" : 5 ,
13+ "type" : " RSSecondary"
14+ }
15+ ]
16+ },
17+ "operation" : " read" ,
18+ "read_preference" : {
19+ "mode" : " SecondaryPreferred" ,
20+ "tag_sets" : [
21+ {
22+ "data_center" : " nyc"
23+ },
24+ {}
25+ ]
26+ },
27+ "suitable_servers" : [
28+ {
29+ "address" : " b:27017" ,
30+ "avg_rtt_ms" : 5 ,
31+ "type" : " RSSecondary"
32+ }
33+ ],
34+ "in_latency_window" : [
35+ {
36+ "address" : " b:27017" ,
37+ "avg_rtt_ms" : 5 ,
38+ "type" : " RSSecondary"
39+ }
40+ ]
41+ }
Original file line number Diff line number Diff line change 1+ # Attempt to select the secondary using an empty tag set. Expect empty tag set to match.
2+ # This is a regression test for RUST-2363.
3+ ---
4+ topology_description :
5+ type : ReplicaSetWithPrimary
6+ servers :
7+ - &1
8+ address : a:27017
9+ avg_rtt_ms : 5
10+ type : RSPrimary
11+ # No "tags".
12+ - &2
13+ address : b:27017
14+ avg_rtt_ms : 5
15+ type : RSSecondary
16+ # No "tags"
17+ operation : read
18+ read_preference :
19+ mode : SecondaryPreferred
20+ tag_sets :
21+ - data_center : nyc # Does not match.
22+ - {} # Empty tag set.
23+ suitable_servers :
24+ - *2
25+ in_latency_window :
26+ - *2
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import {
1111 runServerSelectionLogicTest
1212} from './server_selection_logic_spec_utils' ;
1313
14- describe ( 'Server Selection Logic (spec)' , function ( ) {
14+ describe . only ( 'Server Selection Logic (spec)' , function ( ) {
1515 beforeEach ( function ( ) {
1616 if ( this . currentTest . title . match ( / P o s s i b l e / ) ) {
1717 this . currentTest . skipReason = 'Nodejs driver does not support PossiblePrimary' ;
You can’t perform that action at this time.
0 commit comments