77import org .junit .runners .Parameterized ;
88import org .rnorth .ducttape .TimeoutException ;
99import org .rnorth .ducttape .unreliables .Unreliables ;
10+ import org .rnorth .visibleassertions .VisibleAssertions ;
1011import org .testcontainers .containers .GenericContainer ;
1112import org .testcontainers .images .builder .ImageFromDockerfile ;
1213
1314import java .util .concurrent .TimeUnit ;
1415
1516import static java .util .Arrays .asList ;
16- import static org .rnorth .visibleassertions .VisibleAssertions .assertFalse ;
17- import static org .rnorth .visibleassertions .VisibleAssertions .assertTrue ;
1817
1918@ RunWith (Parameterized .class )
2019public class InternalCommandPortListeningCheckTest {
@@ -45,9 +44,7 @@ public void singleListening() {
4544
4645 Unreliables .retryUntilTrue (5 , TimeUnit .SECONDS , check );
4746
48- final Boolean result = check .call ();
49-
50- assertTrue ("InternalCommandPortListeningCheck identifies a single listening port" , result );
47+ VisibleAssertions .pass ("InternalCommandPortListeningCheck identifies a single listening port" );
5148 }
5249
5350 @ Test
@@ -56,13 +53,9 @@ public void nonListening() {
5653
5754 try {
5855 Unreliables .retryUntilTrue (5 , TimeUnit .SECONDS , check );
56+ VisibleAssertions .fail ("expected to fail" );
5957 } catch (TimeoutException e ) {
60- // we expect it to timeout
6158 }
62-
63- final Boolean result = check .call ();
64-
65- assertFalse ("InternalCommandPortListeningCheck detects a non-listening port among many" , result );
6659 }
6760
6861 @ Test
@@ -71,8 +64,6 @@ public void lowAndHighPortListening() {
7164
7265 Unreliables .retryUntilTrue (5 , TimeUnit .SECONDS , check );
7366
74- final Boolean result = check .call ();
75-
76- assertTrue ("InternalCommandPortListeningCheck identifies a low and a high port" , result );
67+ VisibleAssertions .pass ("InternalCommandPortListeningCheck identifies a low and a high port" );
7768 }
7869}
0 commit comments