[Windows] Address status/fix various flaky_on_windows tests#13837
[Windows] Address status/fix various flaky_on_windows tests#13837ggreenway merged 5 commits intoenvoyproxy:masterfrom greenhouse-org:windows-fix-flakes
Conversation
These fixes reflect that the timing on windows is often less
synchronous than linux observations, due to the design of the
underlying socket stack.
- Correct listener_impl_test, fixes
TcpListenerImplTest.SetListenerRejectFractionIntermediate
- In QuicHttpIntegrationTest, the MultipleQuicConnectionsWithBPF is
never relevant to Windows or macOS (and took a not-insigificant
amount of time per test case.)
- Enable no-longer-failing tests (no failure observed in RBE or locally)
//test/extensions/grpc_credentials/file_based_metadata:integration_test
//test/extensions/transport_sockets/alts:tsi_handshaker_test
//test/integration:http2_flood_integration_test
//test/integration:http2_upstream_integration_test
//test/integration:overload_integration_test
//test/server:guarddog_impl_test
Co-authored-by: Sunjay Bhatia <sunjayb@vmware.com>
Co-authored-by: William A Rowe Jr <wrowe@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: William A Rowe Jr <wrowe@vmware.com>
|
@envoyproxy/windows-dev |
| } | ||
|
|
||
| // Only run on platforms that support BPF | ||
| #if defined(SO_ATTACH_REUSEPORT_CBPF) && defined(__linux__) |
There was a problem hiding this comment.
why not just if defined(SO_ATTACH_REUSEPORT_CBPF)?
There was a problem hiding this comment.
we matched what was in here:
looks like the test has undergone this change already looking back at the blame
There was a problem hiding this comment.
see this diff: f8c3acc#diff-5872f75ef2969ee19f048c4dfc487bb7acc649021940a8acca7a4921b2d5c910
not sure why exactly the ifdef was taken out for platforms that do not support BPF
There was a problem hiding this comment.
originally added here: e176b30#diff-5872f75ef2969ee19f048c4dfc487bb7acc649021940a8acca7a4921b2d5c910R233
|
LGTM |
| testing::InSequence s1; | ||
| EXPECT_CALL(random_generator, random()).WillOnce(Return(std::numeric_limits<uint64_t>::max())); | ||
| EXPECT_CALL(listener_callbacks, onAccept_(_)); | ||
| EXPECT_CALL(listener_callbacks, onAccept_(_)).WillOnce([&] { dispatcher_->exit(); }); |
There was a problem hiding this comment.
Can you explain this change? It's not clear to me why this is better than the old version.
There was a problem hiding this comment.
making the dispatcher exit on the connected event makes the test racy, the dispatcher could exit before there is a chance to invoke the tcp listener onAccept callback which is effectively the last thing that happens when the connection is established/accepted
There was a problem hiding this comment.
Oh I see. I thought the events happened in the opposite order. Sounds good.
| } | ||
|
|
||
| // Only run on platforms that support BPF | ||
| #if defined(SO_ATTACH_REUSEPORT_CBPF) && defined(__linux__) |
There was a problem hiding this comment.
Why ifdef this out? Doesn't it pass on non-bpf platforms? (I'm basing that assumption on the comment below that the runtime override is a no-op on non-bpf platforms).
There was a problem hiding this comment.
It does pass, but may give the wrong impress on non-BPF platforms for someone taking a quick glance that BPF support somehow works, ifdef-ing it out is mainly a clarification
Also, we are having issues with this test timing out, not running the various parameterized runs of this test limits test runtime a bit
There was a problem hiding this comment.
Ah, I think the test really should be renamed, and always run. The name should probably be "Default mode" or something. It is testing that, given no extra config, quic works on this platform, which is why I think it should run on all platforms.
It is doing the same thing as the next test on non-bpf platforms, but the goal is to ensure that both configurations work on all platforms.
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
|
|
||
| TEST_P(QuicHttpIntegrationTest, MultipleQuicConnectionsWithBPF) { testMultipleQuicConnections(); } | ||
| // Ensure multiple quic connections work, regardless of platform BPF support | ||
| TEST_P(QuicHttpIntegrationTest, MultipleQuicConnectionsDefaultMode) { |
There was a problem hiding this comment.
@ggreenway renamed, let me know what you think (removed BPF from the name)
There was a problem hiding this comment.
Yes, that looks better, thanks
| testing::InSequence s1; | ||
| EXPECT_CALL(random_generator, random()).WillOnce(Return(std::numeric_limits<uint64_t>::max())); | ||
| // Exiting dispatcher on client side connect event can cause a race, listener accept callback | ||
| // may not have been triggered, exit dispatcher here to prevent this |
There was a problem hiding this comment.
Nit: period at end of sentence.
Signed-off-by: Sunjay Bhatia <sunjayb@vmware.com>
Commit Message: [Windows] Address status/fix various flaky_on_windows tests
Additional Description:
TcpListenerImplTest.SetListenerRejectFractionIntermediate
These fixes reflect that the timing on windows is often less
synchronous than linux observations, due to the design of the
underlying socket stack.
never relevant to Windows or macOS (and took a not-insignificant
amount of time per test case.)
//test/extensions/grpc_credentials/file_based_metadata:integration_test
//test/extensions/transport_sockets/alts:tsi_handshaker_test
//test/integration:http2_flood_integration_test
//test/integration:http2_upstream_integration_test
//test/integration:overload_integration_test
//test/server:guarddog_impl_test
Co-authored-by: Sunjay Bhatia sunjayb@vmware.com
Co-authored-by: William A Rowe Jr wrowe@vmware.com
Risk Level: Low (test enablement only)
Testing: Windows msvc-cl and clang-cl RBE and locally
Docs Changes: n/a
Release Notes: n/a
Platform Specific Features: n/a