File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
exec/src/test/java/com/marcnuri/demo/kubernetesclient Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1111import java .io .ByteArrayOutputStream ;
1212import java .nio .charset .StandardCharsets ;
1313import java .util .Collections ;
14+ import java .util .Objects ;
1415import java .util .concurrent .CountDownLatch ;
1516import java .util .concurrent .TimeUnit ;
1617
17- import static org .awaitility .Awaitility .await ;
1818import static org .hamcrest .MatcherAssert .assertThat ;
1919import static org .hamcrest .core .Is .is ;
2020
@@ -40,8 +40,7 @@ static void initEnvironment() {
4040 .endMetadata ()
4141 .build ()
4242 ).create ();
43- await ().atMost (10 , TimeUnit .SECONDS ).until (() ->
44- kc .pods ().withName ("busybox" ).get ().getStatus ().getPhase ().equals ("Running" ));
43+ kc .pods ().withName ("busybox" ).waitUntilReady (10 , TimeUnit .SECONDS );
4544 }
4645
4746 @ AfterAll
@@ -52,7 +51,7 @@ static void tearDown() {
5251
5352 private static void deletePod () {
5453 kc .pods ().withName ("busybox" ).withGracePeriod (1L ).delete ();
55- await (). atMost ( 10 , TimeUnit . SECONDS ). until (() -> kc .pods ().withName ("busybox" ).get () == null );
54+ kc .pods ().withName ("busybox" ).waitUntilCondition ( Objects :: isNull , 10 , TimeUnit . SECONDS );
5655 }
5756
5857 @ Test
You can’t perform that action at this time.
0 commit comments