Skip to content

Commit

Permalink
[JENKINS-51584] Unit test was not quite correct.
Browse files Browse the repository at this point in the history
Calling getActions(class) will include actions froma TransientActionFactory.

To get the correct results just call getActions() and then filter the result.
  • Loading branch information
jtnord committed May 30, 2018
1 parent cf3389f commit ed4c94a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -155,7 +155,7 @@ public void transientActionsAreNotPersistedOnQueueItems() throws Exception {
FreeStyleProject p = r.createFreeStyleProject();
FreeStyleBuild build = r.buildAndAssertSuccess(p);
// MyProminentProjectAction is only added via the TransientActionFactory and should never be persisted.
assertThat(build.getActions(MyProminentProjectAction.class), hasSize(0));
assertThat(Util.filter(build.getActions(), MyProminentProjectAction.class), hasSize(0));
assertThat(Util.filter(build.getAllActions(), MyProminentProjectAction.class), hasSize(1));
}

Expand Down

0 comments on commit ed4c94a

Please sign in to comment.