Skip to content

Commit 7eef490

Browse files
authored
minor improvement in fabric8 integration tests (2) (#1869)
* cleanup Signed-off-by: wind57 <[email protected]> * fix test Signed-off-by: wind57 <[email protected]> * fix test Signed-off-by: wind57 <[email protected]> * empty Signed-off-by: wind57 <[email protected]> * simplify test Signed-off-by: wind57 <[email protected]> --------- Signed-off-by: wind57 <[email protected]>
1 parent ec38be1 commit 7eef490

File tree

4 files changed

+1
-37
lines changed
  • spring-cloud-kubernetes-fabric8-leader/src/test/java/org/springframework/cloud/kubernetes/fabric8/leader
  • spring-cloud-kubernetes-integration-tests
    • spring-cloud-kubernetes-fabric8-client-catalog-watcher
    • spring-cloud-kubernetes-fabric8-client-discovery
    • spring-cloud-kubernetes-fabric8-client-istio

4 files changed

+1
-37
lines changed

spring-cloud-kubernetes-fabric8-leader/src/test/java/org/springframework/cloud/kubernetes/fabric8/leader/Fabric8LeaderInitiatorTest.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import java.time.Duration;
2020

21-
import org.awaitility.Awaitility;
2221
import org.junit.jupiter.api.AfterEach;
2322
import org.junit.jupiter.api.BeforeEach;
2423
import org.junit.jupiter.api.Test;
@@ -77,14 +76,6 @@ void shouldStart() {
7776
assertThat(leaderInitiator.isRunning()).isTrue();
7877
verify(mockFabric8LeaderRecordWatcher).start();
7978
verify(mockFabric8PodReadinessWatcher).start();
80-
boolean[] updateCalled = new boolean[1];
81-
Mockito.doAnswer(x -> {
82-
updateCalled[0] = true;
83-
return null;
84-
}).when(mockFabric8LeadershipController).update();
85-
86-
Awaitility.await().atMost(Duration.ofSeconds(3)).until(() -> updateCalled[0]);
87-
8879
verify(mockFabric8LeadershipController, atLeastOnce()).update();
8980
}
9081

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-catalog-watcher/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,4 @@
3636
</dependency>
3737

3838
</dependencies>
39-
<build>
40-
<resources>
41-
<resource>
42-
<directory>../src/main/resources</directory>
43-
<filtering>true</filtering>
44-
</resource>
45-
<resource>
46-
<directory>src/main/resources</directory>
47-
<filtering>true</filtering>
48-
</resource>
49-
</resources>
50-
</build>
5139
</project>

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-discovery/pom.xml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,5 @@
4444
</dependency>
4545

4646
</dependencies>
47-
<build>
48-
<resources>
49-
<resource>
50-
<directory>../src/main/resources</directory>
51-
<filtering>true</filtering>
52-
</resource>
53-
<resource>
54-
<directory>src/main/resources</directory>
55-
<filtering>true</filtering>
56-
</resource>
57-
</resources>
58-
</build>
5947

6048
</project>

spring-cloud-kubernetes-integration-tests/spring-cloud-kubernetes-fabric8-client-istio/pom.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,13 @@
3131
</dependency>
3232

3333
</dependencies>
34+
3435
<build>
3536
<resources>
3637
<resource>
3738
<directory>../src/main/resources</directory>
3839
<filtering>true</filtering>
3940
</resource>
40-
<resource>
41-
<directory>src/main/resources</directory>
42-
<filtering>true</filtering>
43-
</resource>
4441
</resources>
4542
</build>
4643

0 commit comments

Comments
 (0)