File tree Expand file tree Collapse file tree 5 files changed +9
-19
lines changed
src/test/java/com/marcnuri/demo/kubernetesclient
src/test/java/com/marcnuri/demo/kubernetesclient Expand file tree Collapse file tree 5 files changed +9
-19
lines changed Original file line number Diff line number Diff line change 4040 <artifactId >java-hamcrest</artifactId >
4141 <scope >test</scope >
4242 </dependency >
43- <dependency >
44- <groupId >org.awaitility</groupId >
45- <artifactId >awaitility</artifactId >
46- <scope >test</scope >
47- </dependency >
4843 </dependencies >
4944 <build >
5045 <plugins >
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 ;
1514import java .util .concurrent .CountDownLatch ;
1615import java .util .concurrent .TimeUnit ;
1716
@@ -51,7 +50,8 @@ static void tearDown() {
5150
5251 private static void deletePod () {
5352 kc .pods ().withName ("busybox" ).withGracePeriod (1L ).delete ();
54- kc .pods ().withName ("busybox" ).waitUntilCondition (Objects ::isNull , 10 , TimeUnit .SECONDS );
53+ kc .pods ().withName ("busybox" ).waitUntilCondition (p ->
54+ p == null || p .getMetadata ().getDeletionTimestamp () != null , 10 , TimeUnit .SECONDS );
5555 }
5656
5757 @ Test
Original file line number Diff line number Diff line change 1414 <name >${global.name} :: Other Examples</name >
1515
1616 <dependencies >
17+ <dependency >
18+ <groupId >org.slf4j</groupId >
19+ <artifactId >slf4j-simple</artifactId >
20+ </dependency >
1721 <dependency >
1822 <groupId >io.fabric8</groupId >
1923 <artifactId >openshift-client</artifactId >
3034 <groupId >org.assertj</groupId >
3135 <artifactId >assertj-core</artifactId >
3236 </dependency >
33- <dependency >
34- <groupId >org.awaitility</groupId >
35- <artifactId >awaitility</artifactId >
36- </dependency >
3737 </dependencies >
3838 <build >
3939 <plugins >
Original file line number Diff line number Diff line change 3636 <artifactId >java-hamcrest</artifactId >
3737 <scope >test</scope >
3838 </dependency >
39- <dependency >
40- <groupId >org.awaitility</groupId >
41- <artifactId >awaitility</artifactId >
42- <scope >test</scope >
43- </dependency >
4439 </dependencies >
4540 <build >
4641 <plugins >
Original file line number Diff line number Diff line change 1414
1515import java .nio .file .Path ;
1616import java .util .Collections ;
17- import java .util .Objects ;
1817import java .util .concurrent .TimeUnit ;
1918
2019import static com .marcnuri .demo .kubernetesclient .Utils .execCommand ;
@@ -56,8 +55,9 @@ static void tearDown() {
5655 }
5756
5857 private static void deletePod () {
59- kc .pods ().withName (name ).withGracePeriod (1L ).delete ();
60- kc .pods ().withName (name ).waitUntilCondition (Objects ::isNull , 10 , TimeUnit .SECONDS );
58+ kc .pods ().withName (name ).withGracePeriod (0L ).delete ();
59+ kc .pods ().withName (name ).waitUntilCondition (p ->
60+ p == null || p .getMetadata ().getDeletionTimestamp () != null , 10 , TimeUnit .SECONDS );
6161 }
6262
6363 @ Test
You can’t perform that action at this time.
0 commit comments