Skip to content

Commit

Permalink
NIFI-10975 Corrected MockStateManager.assertStateSet()
Browse files Browse the repository at this point in the history
  • Loading branch information
exceptionfactory committed Dec 15, 2022
1 parent d1419ba commit 963fd18
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.concurrent.atomic.AtomicLong;

import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class MockStateManager implements StateManager {
private final AtomicInteger versionIndex = new AtomicInteger(0);
Expand Down Expand Up @@ -262,7 +263,7 @@ public void assertStateNotSet(final String key, final Scope scope) {
*/
public void assertStateSet(final Scope scope) {
final StateMap stateMap = (scope == Scope.CLUSTER) ? clusterStateMap : localStateMap;
assertFalse(stateMap.getStateVersion().isPresent(), "Expected state to be set for Scope " + scope + ", but it was not set");
assertTrue(stateMap.getStateVersion().isPresent(), "Expected state to be set for Scope " + scope + ", but it was not set");
}

/**
Expand Down

0 comments on commit 963fd18

Please sign in to comment.