Added pessimistic locking in several places to shut down deadlocks.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3252 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-06-26 16:43:35 +00:00
parent 64288d531d
commit c6dfeb1c9d
10 changed files with 72 additions and 31 deletions

View File

@@ -35,7 +35,7 @@ public class AVMStressTest extends AVMServiceTestBase
{
try
{
int nCopies = 1;
int nCopies = 4;
int nThreads = 8;
BulkLoader loader = new BulkLoader(fService);
long start = System.currentTimeMillis();
@@ -60,7 +60,7 @@ public class AVMStressTest extends AVMServiceTestBase
20, // modify file.
3200, // read file
10, // snapshot
10000, // # ops
1000, // # ops
fService,
"" + i);
tester.refresh();
@@ -73,6 +73,7 @@ public class AVMStressTest extends AVMServiceTestBase
thread.start();
}
int exited = 0;
long sampStart = System.currentTimeMillis();
while (exited != nThreads)
{
try
@@ -99,6 +100,22 @@ public class AVMStressTest extends AVMServiceTestBase
exited++;
}
}
/*
long now = System.currentTimeMillis();
if (now - sampStart > 30000)
{
System.err.println("RATE: " + (((long)AVMTester.GetCount()) * 1000 / (now - sampStart)));
for (AVMTester tester : testers)
{
tester.setExit();
}
for (Thread thread : threads)
{
thread.join();
}
fail();
}
*/
}
catch (InterruptedException e)
{