From 8a183050a859d1e2d1b32b9ba6b9d5046bd7fe38 Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Thu, 26 Jan 2023 09:09:50 +0100 Subject: Fix unstable test Seems like the logic was flipped in https://github.com/vespa-engine/vespa/pull/21372 --- jrt/tests/com/yahoo/jrt/ConnectTest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'jrt/tests') diff --git a/jrt/tests/com/yahoo/jrt/ConnectTest.java b/jrt/tests/com/yahoo/jrt/ConnectTest.java index 6ad7198f310..034cab29956 100644 --- a/jrt/tests/com/yahoo/jrt/ConnectTest.java +++ b/jrt/tests/com/yahoo/jrt/ConnectTest.java @@ -1,7 +1,6 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.jrt; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; public class ConnectTest { @@ -25,12 +24,12 @@ public class ConnectTest { target.close(); for (int i = 0; i < 100; i++) { - if (!target.isClosed()) { + if (target.isClosed()) { break; } try { Thread.sleep(100); } catch (InterruptedException e) {} } - assertFalse(target.isClosed()); + assertTrue(target.isClosed()); acceptor.shutdown().join(); client.transport().shutdown().join(); -- cgit v1.2.3