gerrithudsontrigger/src/test/java/com/sonyericsson/hudson/plugins/gerrit/trigger/spec/SpecGerritTriggerHudsonTest.java
/**
     * Tests to trigger a build with a dynamic configuration.
     * @throws Exception if so.
     */
Tests to trigger a build with a dynamic configuration.
@throws Exception if so.
Tests to trigger a build with a dynamic configuration . @throws Exception if so .
@LocalData
    public void testDynamicTriggeredBuild() throws Exception {
        ((Config)PluginImpl.getInstance().getConfig()).setDynamicConfigRefreshInterval(1);
        FreeStyleProject project = DuplicatesUtil.createGerritDynamicTriggeredJob(this, "projectX");
        server.waitForCommand(GERRIT_STREAM_EVENTS, 2000);
        waitForDynamicTimer(project, 5000);
        PluginImpl.getInstance().triggerEvent(Setup.createPatchsetCreated());
        RunList<FreeStyleBuild> builds = DuplicatesUtil.waitForBuilds(project, 1, 5000);
        FreeStyleBuild build = builds.get(0);
        assertSame(Result.SUCCESS, build.getResult());
    }
@ LocalData public void testDynamicTriggeredBuild ( ) throws Exception { ( ( Config ) PluginImpl . getInstance ( ) . getConfig ( ) ) . setDynamicConfigRefreshInterval ( 1 ) ; FreeStyleProject project = DuplicatesUtil . createGerritDynamicTriggeredJob ( this , "projectX" ) ; server . waitForCommand ( GERRIT_STREAM_EVENTS , 2000 ) ; waitForDynamicTimer ( project , 5000 ) ; PluginImpl . getInstance ( ) . triggerEvent ( Setup . createPatchsetCreated ( ) ) ; RunList < FreeStyleBuild > builds = DuplicatesUtil . waitForBuilds ( project , 1 , 5000 ) ; FreeStyleBuild build = builds . get ( 0 ) ; assertSame ( Result . SUCCESS , build . getResult ( ) ) ; }
Tests to trigger a build with a dynamic configuration.
Tests to trigger a build with a dynamic configuration .