Repository: falcon Updated Branches: refs/heads/master e77e4d7ab -> 97e35874f
FALCON-1598 Flaky test : EntityManagerJerseyIT.testDuplicateDeleteCommands (Narayan Periwal) Project: http://git-wip-us.apache.org/repos/asf/falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/falcon/commit/3487f718 Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/3487f718 Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/3487f718 Branch: refs/heads/master Commit: 3487f7184a17ebb1bbfad8b7f92e29bb7c064cf5 Parents: e77e4d7 Author: Pallavi Rao <[email protected]> Authored: Mon Dec 7 10:45:09 2015 +0530 Committer: Pallavi Rao <[email protected]> Committed: Mon Dec 7 10:45:09 2015 +0530 ---------------------------------------------------------------------- .../apache/falcon/resource/EntityManagerJerseyIT.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/falcon/blob/3487f718/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java ---------------------------------------------------------------------- diff --git a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java index 23c59f4..abe5bdd 100644 --- a/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java +++ b/webapp/src/test/java/org/apache/falcon/resource/EntityManagerJerseyIT.java @@ -607,18 +607,19 @@ public class EntityManagerJerseyIT { TestContext context = newContext(); Map<String, String> overlay = context.getUniqueOverlay(); context.submitToFalcon(TestContext.CLUSTER_TEMPLATE, overlay, EntityType.CLUSTER); + context.submitToFalcon(TestContext.FEED_TEMPLATE1, overlay, EntityType.FEED); - ExecutorService service = Executors.newSingleThreadExecutor(); - ExecutorService duplicateService = Executors.newSingleThreadExecutor(); + ExecutorService service = Executors.newFixedThreadPool(2); - Future<ClientResponse> future = service.submit(new DeleteCommand(context, overlay.get("cluster"), "cluster")); - Future<ClientResponse> duplicateFuture = duplicateService.submit(new DeleteCommand(context, - overlay.get("cluster"), "cluster")); + Future<ClientResponse> future = service.submit(new DeleteCommand(context, overlay.get("inputFeedName"), + "feed")); + Future<ClientResponse> duplicateFuture = service.submit(new DeleteCommand(context, + overlay.get("inputFeedName"), "feed")); ClientResponse response = future.get(); ClientResponse duplicateSubmitThreadResponse = duplicateFuture.get(); - // since there are duplicate threads for deletion, there is no guarantee which request will succeed. + // since there are two threads for deletion, there is no guarantee which request will succeed. testDuplicateCommandsResponse(context, response, duplicateSubmitThreadResponse); }
