Skip to content

Commit 6341d56

Browse files
committed
Up to version 1.6.2
1 parent 60aaafe commit 6341d56

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/test/java/vanilla/java/affinity/AffinityLockTest.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,12 @@ public void testIssue21() {
140140
AffinityLock al = AffinityLock.acquireLock();
141141
AffinityLock alForAnotherThread = al.acquireLock(AffinityStrategies.ANY);
142142
AffinityLock alForAnotherThread2 = al.acquireLock(AffinityStrategies.ANY);
143-
assertNotSame(alForAnotherThread, alForAnotherThread2);
144-
assertNotSame(alForAnotherThread.cpuId(), alForAnotherThread2.cpuId());
145-
143+
if (alForAnotherThread2.cpuId() < 0) {
144+
System.out.println("Not enough reservable CPUs to perform this test");
145+
} else {
146+
assertNotSame(alForAnotherThread, alForAnotherThread2);
147+
assertNotSame(alForAnotherThread.cpuId(), alForAnotherThread2.cpuId());
148+
}
146149
al.release();
147150
alForAnotherThread.release();
148151
alForAnotherThread2.release();

0 commit comments

Comments
 (0)