mirror of
https://github.com/OpenHFT/Chronicle-Map.git
synced 2021-09-13 01:26:12 +00:00
Merge branch 'master' into ACID=transactions=Isolation=Tests
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>net.openhft</groupId>
|
||||
<artifactId>java-parent-pom</artifactId>
|
||||
@@ -8,9 +11,9 @@
|
||||
<relativePath />
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>chronicle-map</artifactId>
|
||||
<version>3.19.41-SNAPSHOT</version>
|
||||
|
||||
<version>3.19.43-SNAPSHOT</version>
|
||||
<name>OpenHFT/Chronicle-Map</name>
|
||||
<description>Chronicle-Map</description>
|
||||
<packaging>bundle</packaging>
|
||||
@@ -246,7 +249,6 @@
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
<resources>
|
||||
<resource>
|
||||
<directory>src/main/resources</directory>
|
||||
@@ -436,6 +438,26 @@
|
||||
</profiles>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>chronicle-enterprise-snapshots</id>
|
||||
<name>Snapshot Repository</name>
|
||||
<url>
|
||||
https://nexus.chronicle.software/content/repositories/snapshots
|
||||
</url>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>chronicle-enterprise-release</id>
|
||||
<url>
|
||||
https://nexus.chronicle.software/content/repositories/releases
|
||||
</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>central</id>
|
||||
<name>Central Repository</name>
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
package net.openhft.chronicle.map;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
import net.openhft.chronicle.core.Jvm;
|
||||
|
||||
import net.openhft.chronicle.core.OS;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
@@ -24,7 +26,6 @@ import org.junit.rules.TemporaryFolder;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.lang.reflect.Field;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Iterator;
|
||||
import java.util.concurrent.atomic.AtomicReference;
|
||||
@@ -36,6 +37,7 @@ public class ExitHookTest {
|
||||
|
||||
private static final int KEY = 1;
|
||||
private static final int JVM_STARTUP_WAIT_TIME_MS = 5_000;
|
||||
|
||||
private static final String PRE_SHUTDOWN_ACTION_EXECUTED = "PRE_SHUTDOWN_ACTION_EXECUTED";
|
||||
private static final String USER_SHUTDOWN_HOOK_EXECUTED = "USER_SHUTDOWN_HOOK_EXECUTED";
|
||||
|
||||
@@ -104,19 +106,8 @@ public class ExitHookTest {
|
||||
|
||||
// http://stackoverflow.com/a/33171840/648955
|
||||
public static long getPidOfProcess(Process p) {
|
||||
long pid = -1;
|
||||
|
||||
try {
|
||||
if (p.getClass().getName().equals("java.lang.UNIXProcess")) {
|
||||
Field f = p.getClass().getDeclaredField("pid");
|
||||
f.setAccessible(true);
|
||||
pid = f.getLong(p);
|
||||
f.setAccessible(false);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
pid = -1;
|
||||
}
|
||||
return pid;
|
||||
Number pid = Jvm.getValue(p, "pid");
|
||||
return pid.longValue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Tracing if resources are closed/released correctly.
|
||||
jvm.resource.tracing=true
|
||||
check.thread.safety=true
|
||||
# for profiling
|
||||
jvm.safepoint.enabled=false
|
||||
Reference in New Issue
Block a user