Merge pull request #98 from bsinno/stabilize-eventbus-driven-tests

made progress counter volatile
This commit is contained in:
Michael Hirsch
2016-03-17 12:53:01 +01:00
2 changed files with 4 additions and 8 deletions

View File

@@ -1021,8 +1021,7 @@ public class DeploymentManagementTest extends AbstractIntegrationTest {
}
private static class EventHandlerMock {
private final List<TargetAssignDistributionSetEvent> events = Collections
.synchronizedList(new LinkedList<TargetAssignDistributionSetEvent>());
private final List<TargetAssignDistributionSetEvent> events = Collections.synchronizedList(new LinkedList<>());
private final CountDownLatch latch;
private final int expectedNumberOfEvents;
@@ -1050,8 +1049,7 @@ public class DeploymentManagementTest extends AbstractIntegrationTest {
}
private static class CancelEventHandlerMock {
private final List<CancelTargetAssignmentEvent> events = Collections
.synchronizedList(new LinkedList<CancelTargetAssignmentEvent>());
private final List<CancelTargetAssignmentEvent> events = Collections.synchronizedList(new LinkedList<>());
private final CountDownLatch latch;
private final int expectedNumberOfEvents;

View File

@@ -64,13 +64,11 @@ import ru.yandex.qatools.allure.annotations.Stories;
@Stories("Artifact Download Resource")
public class ArtifactDownloadTest extends AbstractIntegrationTestWithMongoDB {
private static final String AUTH_ANOYM = "ROLE_CONTROLLER_ANONYMOUS";
public ArtifactDownloadTest() {
LOG = LoggerFactory.getLogger(ArtifactDownloadTest.class);
}
private int downLoadProgress = 0;
private volatile int downLoadProgress = 0;
@Autowired
private EventBus eventBus;
@@ -364,7 +362,7 @@ public class ArtifactDownloadTest extends AbstractIntegrationTestWithMongoDB {
// create target
Target target = new Target("4712");
target = targetManagement.createTarget(target);
final List<Target> targets = new ArrayList();
final List<Target> targets = new ArrayList<>();
targets.add(target);
// create ds