File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
src/test/java/vanilla/java/affinity Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments