Commit e1e19180 authored by Matt Menke's avatar Matt Menke Committed by Commit Bot

Fix test that deleting the primary NetworkContext destroys all others.

The test wasn't waiting for the secondary NetworkContext to be created,
so it could end up that the secondary NetworkContext was created only
after the primary one was destroyed.

Bug: 869551
Cq-Include-Trybots: luci.chromium.try:linux_mojo
Change-Id: Iaefbb98553175cf4e3784017adafe227888c588b
Reviewed-on: https://chromium-review.googlesource.com/1159588Reviewed-by: default avatarJohn Abd-El-Malek <jam@chromium.org>
Commit-Queue: Matt Menke <mmenke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580127}
parent be463a2a
...@@ -991,6 +991,10 @@ TEST_F(NetworkServiceTestWithService, ...@@ -991,6 +991,10 @@ TEST_F(NetworkServiceTestWithService,
CreateContextParams()); CreateContextParams());
network_context.set_connection_error_handler(run_loop.QuitClosure()); network_context.set_connection_error_handler(run_loop.QuitClosure());
// Wait until the new NetworkContext has been created, so it's not created
// after the primary NetworkContext is destroyed.
network_service_.FlushForTesting();
// Destroying |cert_validating_network_context| should result in destroying // Destroying |cert_validating_network_context| should result in destroying
// |network_context| as well. // |network_context| as well.
cert_validating_network_context.reset(); cert_validating_network_context.reset();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment