File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
affinity/src/test/java/net/openhft/affinity Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 19
19
20
20
import net .openhft .affinity .impl .Utilities ;
21
21
import net .openhft .affinity .impl .VanillaCpuLayout ;
22
- import net .openhft .affinity .testimpl .TestFileLockBasedLockChecker ;
23
22
import org .hamcrest .MatcherAssert ;
24
23
import org .junit .Test ;
25
24
import org .slf4j .Logger ;
28
27
import java .io .File ;
29
28
import java .io .IOException ;
30
29
import java .nio .file .Files ;
30
+ import java .nio .file .Path ;
31
31
import java .nio .file .Paths ;
32
32
import java .util .ArrayList ;
33
33
import java .util .List ;
44
44
public class AffinityLockTest extends BaseAffinityTest {
45
45
private static final Logger logger = LoggerFactory .getLogger (AffinityLockTest .class );
46
46
47
- private final TestFileLockBasedLockChecker lockChecker = new TestFileLockBasedLockChecker ();
48
47
49
48
@ Test
50
49
public void dumpLocksI7 () throws IOException {
@@ -255,11 +254,12 @@ public void lockFilesShouldBeRemovedOnRelease() {
255
254
}
256
255
final AffinityLock lock = AffinityLock .acquireLock ();
257
256
258
- assertTrue (Files .exists (Paths .get (lockChecker .doToFile (lock .cpuId ()).getAbsolutePath ())));
257
+ Path lockFile = Paths .get (System .getProperty ("java.io.tmpdir" ), "cpu-" + lock .cpuId () + ".lock" );
258
+ assertTrue (Files .exists (lockFile ));
259
259
260
260
lock .release ();
261
261
262
- assertFalse (Files .exists (Paths . get ( lockChecker . doToFile ( lock . cpuId ()). getAbsolutePath ()) ));
262
+ assertFalse (Files .exists (lockFile ));
263
263
}
264
264
265
265
@ Test
You can’t perform that action at this time.
0 commit comments