Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JENKINS-36623] Fix Tests for Jenkins 1.651.3 (#95)
* [JENKINS-36623] Fix SelfPromotionInheritanceTest#testPromotionEnvironmentShouldIncludeTargetParameters to work after SECURITY-170 * [JENKINS-36623] Upgrade PromotionProcessTest to work against jenkins 1.575+ * [JENKINS-36623] Upgrade KeepBuildForeverActionTest work against jenkins 1.575+ * [JENKINS-36623] Upgrade SelfPromotionInheritanceTest to work against Jenkins 1.575+ * [JENKINS-36623] Code style conventions * [JENKINS-36623] Move ItemListener invocation to an utility method * [JENKINS-36623] Add TODO and mention to JENKINS-34831 * [JENKINS-36623] Code Style * [JENKINS-36623] Move ItemListenerhelper to test folder * [JENKINS-36623] Added TODO note
- Loading branch information
1 parent
4450b50
commit f7589c3
Showing
4 changed files
with
44 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/test/java/hudson/plugins/promoted_builds/util/ItemListenerHelper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package hudson.plugins.promoted_builds.util; | ||
|
||
import hudson.model.listeners.ItemListener; | ||
|
||
/** | ||
* Utility class to call ArtifactArchiver.Migrator ItemListener to make this code compatible with jenkins 1.575+ | ||
*/ | ||
public class ItemListenerHelper { | ||
// TODO remove this class (and usages) after the baseline has been upgraded to Jenkins 1.575+ | ||
|
||
/** | ||
* Executes all available ItemListeners | ||
*/ | ||
public static void fireItemListeners() { | ||
for (ItemListener l : ItemListener.all()) { | ||
l.onLoaded(); | ||
} | ||
} | ||
} |