diff --git a/spring/src/test/java/io/kubernetes/client/spring/extended/controller/KubernetesInformerCreatorTest.java b/spring/src/test/java/io/kubernetes/client/spring/extended/controller/KubernetesInformerCreatorTest.java index ed40b05491..88a12b4834 100644 --- a/spring/src/test/java/io/kubernetes/client/spring/extended/controller/KubernetesInformerCreatorTest.java +++ b/spring/src/test/java/io/kubernetes/client/spring/extended/controller/KubernetesInformerCreatorTest.java @@ -125,9 +125,11 @@ void informerInjection() throws InterruptedException { get(urlPathEqualTo("/api/v1/pods")) .withPostServeAction("semaphore", getParams) .withQueryParam("watch", equalTo("false")) + .atPriority(1) .willReturn( aResponse() .withStatus(200) + .withHeader("Content-Type", "application/json") .withBody( JSON.serialize( new V1PodList() @@ -137,15 +139,22 @@ void informerInjection() throws InterruptedException { get(urlPathEqualTo("/api/v1/pods")) .withPostServeAction("semaphore", watchParams) .withQueryParam("watch", equalTo("true")) - .willReturn(aResponse().withStatus(200).withBody("{}"))); + .atPriority(2) + .willReturn( + aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody("{}"))); apiServer.stubFor( get(urlPathEqualTo("/api/v1/namespaces/default/configmaps")) .withPostServeAction("semaphore", getParams) .withQueryParam("watch", equalTo("false")) + .atPriority(1) .willReturn( aResponse() .withStatus(200) + .withHeader("Content-Type", "application/json") .withBody( JSON.serialize( new V1ConfigMapList() @@ -155,7 +164,12 @@ void informerInjection() throws InterruptedException { get(urlPathEqualTo("/api/v1/namespaces/default/configmaps")) .withPostServeAction("semaphore", watchParams) .withQueryParam("watch", equalTo("true")) - .willReturn(aResponse().withStatus(200).withBody("{}"))); + .atPriority(2) + .willReturn( + aResponse() + .withStatus(200) + .withHeader("Content-Type", "application/json") + .withBody("{}"))); // These will be released for each web call above. getCount.acquire(2);