1description: "New primary with wrong setName" 2 3uri: "mongodb://a/?replicaSet=rs" 4 5phases: [ 6 7 # Primary is discovered normally, and tells us about server B. 8 { 9 responses: [ 10 11 ["a:27017", { 12 13 ok: 1, 14 ismaster: true, 15 hosts: ["a:27017", "b:27017"], 16 setName: "rs", 17 minWireVersion: 0, 18 maxWireVersion: 6 19 }] 20 ], 21 22 outcome: { 23 24 servers: { 25 26 "a:27017": { 27 28 type: "RSPrimary", 29 setName: "rs" 30 }, 31 32 "b:27017": { 33 34 type: "Unknown", 35 setName: 36 } 37 }, 38 topologyType: "ReplicaSetWithPrimary", 39 logicalSessionTimeoutMinutes: null, 40 setName: "rs" 41 } 42 }, 43 44 # B is actually the primary of another replica set. It's removed, and 45 # topologyType remains ReplicaSetWithPrimary. 46 { 47 responses: [ 48 49 ["b:27017", { 50 51 ok: 1, 52 ismaster: true, 53 hosts: ["a:27017"], 54 setName: "wrong", 55 minWireVersion: 0, 56 maxWireVersion: 6 57 }] 58 ], 59 60 outcome: { 61 62 servers: { 63 64 "a:27017": { 65 66 type: "RSPrimary", 67 setName: "rs" 68 } 69 }, 70 topologyType: "ReplicaSetWithPrimary", 71 logicalSessionTimeoutMinutes: null, 72 setName: "rs" 73 } 74 } 75] 76