Skip to content

Commit

Permalink
[MENFORCER-398] show rules processed
Browse files Browse the repository at this point in the history
  • Loading branch information
raupachz authored and slawekjaranowski committed Jul 31, 2022
1 parent 28684b2 commit b61b6b8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ public void execute()
// store the current rule for
// logging purposes
currentRule = rule.getClass().getName();
log.debug( "Executing rule: " + currentRule );
try
{
if ( ignoreCache || shouldExecute( rule ) )
Expand All @@ -196,6 +195,7 @@ public void execute()
// noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized ( rule )
{
log.info( "Executing rule: " + currentRule );
rule.execute( helper );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public void testEnforceMojo()
{
setupBasics( false );

Log logSpy = setupLogSpy();

try
{
mojo.execute();
Expand All @@ -70,6 +72,8 @@ public void testEnforceMojo()

mojo.execute();

Mockito.verify( logSpy, Mockito.times(2) ).info( Mockito.contains("Executing rule: " + MockEnforcerRule.class.getName()) );

try
{
mojo.setFailFast( false );
Expand Down

0 comments on commit b61b6b8

Please sign in to comment.