Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import java.time.Duration;

import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -77,14 +76,6 @@ void shouldStart() {
assertThat(leaderInitiator.isRunning()).isTrue();
verify(mockFabric8LeaderRecordWatcher).start();
verify(mockFabric8PodReadinessWatcher).start();
boolean[] updateCalled = new boolean[1];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplifies the failing test. We already verify that the method is called, no need to do it twice

Mockito.doAnswer(x -> {
updateCalled[0] = true;
return null;
}).when(mockFabric8LeadershipController).update();

Awaitility.await().atMost(Duration.ofSeconds(3)).until(() -> updateCalled[0]);

verify(mockFabric8LeadershipController, atLeastOnce()).update();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,4 @@
</dependency>

</dependencies>
<build>
<resources>
<resource>
<directory>../src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,5 @@
</dependency>

</dependencies>
<build>
<resources>
<resource>
<directory>../src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

</project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@
</dependency>

</dependencies>

<build>
<resources>
<resource>
<directory>../src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</build>

Expand Down
Loading