* Test that an event marked as onTriggering blocks any build linked to it, and after
* onDoneTriggeringAll, the build should wait for the dependency to be done, and then should build.
*/
@Test
public void shouldBlockTriggeringEvents() {
PatchsetCreated patchsetCreated = Setup.createPatchsetCreated("someGerritServer", "someProject",
"refs/changes/1/1/1");
dispatcher.onTriggeringAll(patchsetCreated);
Queue.Item item = createItem(patchsetCreated, "upstream");
CauseOfBlockage cause = dispatcher.canRun(item);
assertNotNull("Build should be blocked", cause);