Skip to content

Commit

Permalink
mobile: fix quic_test_server_test (#32755)
Browse files Browse the repository at this point in the history
Commit Message: the test failed after #32260 because the test server uses a mocked MockTransportSocketFactoryContext which doesn't return a real ContextManager object in sslContextManager(). The mocked object returns nullptr in createSslServerContext(), thus fail to initialize the new member ssl_ctx_ in QuicServerTransportSocketFactory.

Additional Description: bazel test //test/java/io/envoyproxy/envoymobile/engine/testing:quic_test_server_test passes in this PR
Risk Level: low, test only
Testing: existing tests pass
Docs Changes: N/A
Release Notes: N/A
Platform Specific Features: N/A

Signed-off-by: Dan Zhang <[email protected]>
  • Loading branch information
danzh2010 authored Mar 7, 2024
1 parent a19dce3 commit 0bd73e3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mobile/test/common/integration/test_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ TestServer::TestServer()
ON_CALL(factory_context_.server_context_, api()).WillByDefault(testing::ReturnRef(*api_));
ON_CALL(factory_context_, statsScope())
.WillByDefault(testing::ReturnRef(*stats_store_.rootScope()));
ON_CALL(factory_context_, sslContextManager())
.WillByDefault(testing::ReturnRef(context_manager_));
}

void TestServer::startTestServer(TestServerType test_server_type) {
Expand Down

0 comments on commit 0bd73e3

Please sign in to comment.