Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(713)

Unified Diff: net/tools/quic/end_to_end_test.cc

Issue 1976393002: Reduces flakiness of EndToEndTest.ConnectionMigrationClientPortChanged. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@121638470
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/end_to_end_test.cc
diff --git a/net/tools/quic/end_to_end_test.cc b/net/tools/quic/end_to_end_test.cc
index ecf93c65355dcc04ca21627c86430a04143e46b3..e9e5f2a0ec22155ff330f8c6abcc905ed7721d54 100644
--- a/net/tools/quic/end_to_end_test.cc
+++ b/net/tools/quic/end_to_end_test.cc
@@ -1474,15 +1474,15 @@ TEST_P(EndToEndTest, ConnectionMigrationClientPortChanged) {
// Store the client address which was used to send the first request.
IPEndPoint old_address = client_->client()->GetLatestClientAddress();
-
- // Stop listening and close the old FD.
- QuicClientPeer::CleanUpUDPSocket(client_->client(),
- client_->client()->GetLatestFD());
+ int old_fd = client_->client()->GetLatestFD();
// Create a new socket before closing the old one, which will result in a new
// ephemeral port.
QuicClientPeer::CreateUDPSocketAndBind(client_->client());
+ // Stop listening and close the old FD.
+ QuicClientPeer::CleanUpUDPSocket(client_->client(), old_fd);
+
// The packet writer needs to be updated to use the new FD.
client_->client()->CreateQuicPacketWriter();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698