Skip to content

Commit 624ff54

Browse files
committed
Fix Linux tests so they are ignored on windows.
1 parent 386568a commit 624ff54

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

affinity/src/main/java/net/openhft/affinity/impl/LinuxJNAAffinity.java

100644100755
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,14 @@ public enum LinuxJNAAffinity implements IAffinity {
3333
private static final int SYS_gettid = Platform.is64Bit() ? 186 : 224;
3434
private static final Object[] NO_ARGS = {};
3535

36+
private static final String OS = System.getProperty("os.name").toLowerCase();
37+
private static final boolean IS_LINUX = OS.startsWith("linux");
38+
3639
static {
3740
int pid = -1;
3841
try {
3942
pid = LinuxHelper.getpid();
40-
} catch (Exception ignored) {
43+
} catch (NoClassDefFoundError | Exception ignored) {
4144
}
4245
PROCESS_ID = pid;
4346
}
@@ -47,8 +50,9 @@ public enum LinuxJNAAffinity implements IAffinity {
4750
try {
4851
INSTANCE.getAffinity();
4952
loaded = true;
50-
} catch (UnsatisfiedLinkError e) {
51-
LOGGER.warn("Unable to load jna library {}", e);
53+
} catch (NoClassDefFoundError | UnsatisfiedLinkError e) {
54+
if (IS_LINUX)
55+
LOGGER.warn("Unable to load jna library {}", e);
5256
}
5357
LOADED = loaded;
5458
}

affinity/src/main/java/net/openhft/affinity/impl/VanillaCpuLayout.java

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* @author peter.lawrey
3131
*/
3232
public class VanillaCpuLayout implements CpuLayout {
33-
public static final int MAX_CPUS_SUPPORTED = 64;
33+
public static final int MAX_CPUS_SUPPORTED = 256;
3434

3535
@NotNull
3636
private final List<CpuInfo> cpuDetails;

0 commit comments

Comments
 (0)