Skip to content

Commit

Permalink
[MENFORCER-462] Execute ReactorModuleConvergence only once
Browse files Browse the repository at this point in the history
Rule checks whole reactor of current build so can be executed once in session
  • Loading branch information
slawekjaranowski committed Jan 28, 2023
1 parent 3e12af9 commit 769da0a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,11 @@ private void addMessageIfExist(StringBuilder sb) {
}
}

@Override
public String getCacheId() {
return String.valueOf(toString().hashCode());
}

@Override
public String toString() {
return String.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.assertj.core.api.Assertions.assertThat;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
Expand Down Expand Up @@ -221,6 +222,11 @@ void shouldFailWithWrongDependencyInReactor() {
// intentionally no assertTrue() cause we expect getting an exception.
}

@Test
void cacheIdShouldBeSet() {
assertThat(rule.getCacheId()).isNotEmpty();
}

/**
* This small setup is equivalent to the following situation:
*
Expand Down

0 comments on commit 769da0a

Please sign in to comment.