File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed
test/jdk/com/sun/net/httpserver Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -166,19 +166,8 @@ public void shouldCompleteAfterDelay() throws InterruptedException {
166166 log ("Shutdown triggered with the delay of " + delayDuration .getSeconds ());
167167 final long elapsed = timeShutdown (delayDuration );
168168 log ("Shutdown complete" );
169-
170- // Complete the exchange 10 second into the future.
171- // Runs in parallel, so won't block the server stop
172- final Duration exchangeDuration = Duration .ofSeconds (Utils .adjustTimeout (10 ));
173- // taking start time before entering completeExchange to account for possible
174- // delays in reaching server.stop().
175- completeExchange (exchangeDuration );
176- log ("Complete Exchange triggered" );
177-
178- // The shutdown should not await the exchange to complete
179- if (elapsed >= exchangeDuration .toNanos ()) {
180- fail ("HttpServer.stop terminated too late" );
181- }
169+ complete .countDown ();
170+ log ("Exchange completed" );
182171
183172 // The shutdown delay should have expired
184173 if (elapsed < delayDuration .toNanos ()) {
You can’t perform that action at this time.
0 commit comments