Skip to content

Commit e1b5e53

Browse files
author
Rob Austin
committed
fixed test case
1 parent e581940 commit e1b5e53

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

affinity/src/test/java/net/openhft/affinity/AffinityLockTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
@SuppressWarnings("ALL")
3636
public class AffinityLockTest {
3737
private static final Logger logger = LoggerFactory.getLogger(AffinityLockTest.class);
38+
3839
@Test
3940
public void dumpLocksI7() throws IOException {
4041
LockInventory lockInventory = new LockInventory(VanillaCpuLayout.fromCpuInfo("i7.cpuinfo"));
@@ -151,7 +152,8 @@ public void testIssue21() throws IOException {
151152
if (Runtime.getRuntime().availableProcessors() > 2) {
152153
AffinityLock alForAnotherThread2 = al.acquireLock(AffinityStrategies.ANY);
153154
assertNotSame(alForAnotherThread, alForAnotherThread2);
154-
assertNotSame(alForAnotherThread.cpuId(), alForAnotherThread2.cpuId());
155+
if (alForAnotherThread.cpuId() != -1)
156+
assertNotSame(alForAnotherThread.cpuId(), alForAnotherThread2.cpuId());
155157

156158
alForAnotherThread2.release();
157159

0 commit comments

Comments
 (0)