File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
affinity/src/test/java/net/openhft/affinity Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public class MultiProcessAffinityTest {
2020 public void shouldNotAcquireLockOnCoresLockedByOtherProcesses () throws IOException , InterruptedException {
2121 Assume .assumeTrue (IS_LINUX );
2222 // run the separate affinity locker
23- final Process last = ProcessRunner .runClass (AffinityLockerProcess .class , "last" );
23+ final Process affinityLockerProcess = ProcessRunner .runClass (AffinityLockerProcess .class , "last" );
2424 try {
2525 int lastCpuId = AffinityLock .PROCESSORS - 1 ;
2626
@@ -29,6 +29,7 @@ public void shouldNotAcquireLockOnCoresLockedByOtherProcesses() throws IOExcepti
2929 while (FileLockBasedLockChecker .getInstance ().isLockFree (lastCpuId )) {
3030 Thread .sleep (100 );
3131 if (System .currentTimeMillis () > endTime ) {
32+ ProcessRunner .printProcessOutput ("AffinityLockerProcess" , affinityLockerProcess );
3233 fail ("Timed out waiting for the sub-process to acquire the lock" );
3334 }
3435 }
@@ -37,8 +38,8 @@ public void shouldNotAcquireLockOnCoresLockedByOtherProcesses() throws IOExcepti
3738 assertNotEquals (lastCpuId , lock .cpuId ());
3839 }
3940 } finally {
40- last .destroy ();
41- if (!last .waitFor (5 , TimeUnit .SECONDS )) {
41+ affinityLockerProcess .destroy ();
42+ if (!affinityLockerProcess .waitFor (5 , TimeUnit .SECONDS )) {
4243 fail ("Sub-process didn't terminate!" );
4344 }
4445 }
You can’t perform that action at this time.
0 commit comments