Skip to content

Commit fab6ced

Browse files
committed
fixes test flakiness
1 parent bb2accf commit fab6ced

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

util/src/test/java/io/kubernetes/client/CopyTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
import static com.github.tomakehurst.wiremock.client.WireMock.get;
1818
import static com.github.tomakehurst.wiremock.client.WireMock.getRequestedFor;
1919
import static com.github.tomakehurst.wiremock.client.WireMock.urlPathEqualTo;
20-
import static com.github.tomakehurst.wiremock.client.WireMock.verify;
2120
import static com.github.tomakehurst.wiremock.core.WireMockConfiguration.wireMockConfig;
2221

2322
import com.github.tomakehurst.wiremock.junit.WireMockRule;
@@ -75,7 +74,9 @@ public void testUrl() throws IOException, ApiException, InterruptedException {
7574
e.printStackTrace();
7675
}
7776

78-
verify(
77+
Thread.sleep(2000);
78+
79+
wireMockRule.verify(
7980
getRequestedFor(
8081
urlPathEqualTo("/api/v1/namespaces/" + namespace + "/pods/" + podName + "/exec"))
8182
.withQueryParam("stdin", equalTo("false"))
@@ -120,7 +121,7 @@ public void run() {
120121
Thread.sleep(2000);
121122
t.interrupt();
122123

123-
verify(
124+
wireMockRule.verify(
124125
getRequestedFor(
125126
urlPathEqualTo("/api/v1/namespaces/" + namespace + "/pods/" + podName + "/exec"))
126127
.withQueryParam("stdin", equalTo("true"))
@@ -166,7 +167,7 @@ public void run() {
166167
Thread.sleep(2000);
167168
t.interrupt();
168169

169-
verify(
170+
wireMockRule.verify(
170171
getRequestedFor(
171172
urlPathEqualTo("/api/v1/namespaces/" + namespace + "/pods/" + podName + "/exec"))
172173
.withQueryParam("stdin", equalTo("true"))
@@ -213,7 +214,7 @@ public void run() {
213214
Thread.sleep(2000);
214215
t.interrupt();
215216

216-
verify(
217+
wireMockRule.verify(
217218
getRequestedFor(
218219
urlPathEqualTo("/api/v1/namespaces/" + namespace + "/pods/" + podName + "/exec"))
219220
.withQueryParam("stdin", equalTo("false"))

0 commit comments

Comments
 (0)