test(connlib): set TCP connections as connected after roaming (#10910)

TCP connections have a keep-alive mechanism and therefore will
automatically trigger a new connection to a resource after roaming. We
need to model this in our tests by setting the resource as connected
whenever we reset the network state.
This commit is contained in:
Thomas Eizinger
2025-11-19 17:49:47 +11:00
committed by GitHub
parent ea5e734254
commit aa4a08889b
2 changed files with 5 additions and 3 deletions

View File

@@ -243,3 +243,4 @@ cc 19b20eeea8590ac247e6534e42344cc4ae67a5d8e964f04e81b56f344d257c7b
cc 46d17b15ff020c3f4982c43d85a342c5d10f5cec34a2316282ecfbe3a684573d
cc a2746c27c8acc2f163989297aba492f9c767d7d4b72fef1cb9b84b65e5cbdfea
cc cb2df5e990c2f5c60f41f3b4dfe82736369a99dae8824bcc592831b3f366bc14
cc c2226109d6e9a7566da7c5bcb4e9f3ca0bfd2b1b17a9f6e5db6515b3f0b1945e

View File

@@ -648,12 +648,13 @@ impl RefClient {
}
// TCP connections will automatically re-create connections to Gateways.
for r in self
for ((_, dst, _, _), r) in self
.expected_tcp_connections
.values()
.copied()
.clone()
.into_iter()
.collect::<Vec<_>>()
{
self.connect_to_resource(r, dst);
self.set_resource_online(r);
}
}