From eef6a3fc3f71a47aae7bbd38c3b00405b1fe8bcb Mon Sep 17 00:00:00 2001 From: Nick Burch Date: Tue, 19 Oct 2010 12:25:29 +0000 Subject: [PATCH] Push out multi threaded sleeps, as the post-transaction-commit hooks seem to take longer on some machines than you might expect git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23208 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../alfresco/repo/tagging/TaggingServiceImplTest.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java b/source/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java index 37a8e73e29..d6aeb46423 100644 --- a/source/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java +++ b/source/java/org/alfresco/repo/tagging/TaggingServiceImplTest.java @@ -1210,8 +1210,15 @@ public class TaggingServiceImplTest extends TestCase System.out.println(Thread.currentThread() + " - Tagging"); return null; } - }, false, true); + }, false, true + ); System.out.println(Thread.currentThread() + " - Done tagging"); + + // Wait briefly for thing to catch up, before we + // declare ourselves to be done + try { + Thread.sleep(150); + } catch (InterruptedException e) {} } }); threads.add(t); @@ -1261,7 +1268,7 @@ public class TaggingServiceImplTest extends TestCase } // Extra sleep just to be sure things are quiet before we continue - Thread.sleep(150); + Thread.sleep(175); // Now check that things ended up as planned tx = this.transactionService.getUserTransaction();