Skip to content

Commit f2c80b8

Browse files
GODRIVER-3054 Add test to make target
1 parent d99bc98 commit f2c80b8

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ evg-test-load-balancers:
153153
go test $(BUILD_TAGS) ./mongo/integration -run TestChangeStreamSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite
154154
go test $(BUILD_TAGS) ./mongo/integration -run TestInitialDNSSeedlistDiscoverySpec/load_balanced -v -timeout $(TEST_TIMEOUT)s >> test.suite
155155
go test $(BUILD_TAGS) ./mongo/integration -run TestLoadBalancerSupport -v -timeout $(TEST_TIMEOUT)s >> test.suite
156-
go test $(BUILD_TAGS) ./mongo/integration/unified -run TestUnifiedSpec -v -timeout $(TEST_TIMEOUT)s >> test.suite
156+
go test $(BUILD_TAGS) ./mongo/integration -run TestLoadBalancedConnectionHandshake -v -timeout $(TEST_TIMEOUT)s >> test.suite
157+
go test $(BUILD_TAGS) ./mongo/integration/unified -run TestUnifiedSpec -v -timeout $(TEST_TIMEOUT)s >> test.suitego
157158

158159
.PHONY: evg-test-search-index
159160
evg-test-search-index:

mongo/integration/client_test.go

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -768,27 +768,6 @@ func TestClient(t *testing.T) {
768768
"expected 'OP_MSG' OpCode in wire message, got %q", pair.Sent.OpCode.String())
769769
}
770770
})
771-
772-
// Test that OP_MSG is used for handshakes when loadBalanced is true.
773-
opMsgLBOpts := mtest.NewOptions().ClientType(mtest.Proxy).MinServerVersion("5.0").Topologies(mtest.LoadBalanced)
774-
mt.RunOpts("OP_MSG used for handshakes when loadBalanced is true", opMsgLBOpts, func(mt *mtest.T) {
775-
err := mt.Client.Ping(context.Background(), mtest.PrimaryRp)
776-
assert.Nil(mt, err, "Ping error: %v", err)
777-
778-
msgPairs := mt.GetProxiedMessages()
779-
assert.True(mt, len(msgPairs) >= 3, "expected at least 3 events, got %v", len(msgPairs))
780-
781-
// First three messages should be connection handshakes: one for the heartbeat connection, another for the
782-
// application connection, and a final one for the RTT monitor connection.
783-
for idx, pair := range msgPairs[:3] {
784-
assert.Equal(mt, "hello", pair.CommandName, "expected command name 'hello' at index %d, got %s", idx,
785-
pair.CommandName)
786-
787-
// Assert that appended OpCode is OP_MSG when loadBalanced is true.
788-
assert.Equal(mt, wiremessage.OpMsg, pair.Sent.OpCode,
789-
"expected 'OP_MSG' OpCode in wire message, got %q", pair.Sent.OpCode.String())
790-
}
791-
})
792771
}
793772

794773
func TestClient_BSONOptions(t *testing.T) {

0 commit comments

Comments
 (0)