Fix WebTransport E2E test that breaks under ASAN
Turns out that checking a variable and then immediately asserting on the next line that the variable does not exist is a sign of something gone fairly wrong.
PiperOrigin-RevId: 401144389
diff --git a/quic/core/http/end_to_end_test.cc b/quic/core/http/end_to_end_test.cc
index 1e94413..29688b9 100644
--- a/quic/core/http/end_to_end_test.cc
+++ b/quic/core/http/end_to_end_test.cc
@@ -6522,11 +6522,10 @@
EXPECT_TRUE(stream->Write("test"));
EXPECT_TRUE(stream->SendFin());
- client_->WaitUntil(-1, [connect_stream]() {
- return connect_stream->headers_decompressed();
- });
- EXPECT_TRUE(GetClientSession()->GetOrCreateSpdyDataStream(
- connect_stream_id) == nullptr);
+ EXPECT_TRUE(client_->WaitUntil(-1, [this, connect_stream_id]() {
+ return GetClientSession()->GetOrCreateSpdyDataStream(connect_stream_id) ==
+ nullptr;
+ }));
}
} // namespace