mirror of
https://gitee.com/jmix/cuba.git
synced 2024-12-03 03:38:33 +08:00
Fix tests for JavaClassLoader #PL-1977
This commit is contained in:
parent
b74d77faf2
commit
22cb1918c9
@ -12,7 +12,7 @@ import java.io.File;
|
||||
import java.util.Date;
|
||||
|
||||
public class JavaClassLoaderTest {
|
||||
// @Test
|
||||
@Test
|
||||
public void testDependencies() throws Exception {
|
||||
System.out.println(new File(".").getAbsolutePath());
|
||||
|
||||
@ -45,7 +45,7 @@ public class JavaClassLoaderTest {
|
||||
System.out.println("Class reloaded");
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
public void testDependent() throws Exception {
|
||||
JavaClassLoader javaClassLoader = new JavaClassLoader(null, "./test-data/javacl-sources/", "") {
|
||||
@Override
|
||||
@ -78,7 +78,7 @@ public class JavaClassLoaderTest {
|
||||
Assert.assertEquals(simpleClass4_2, simpleClass4_3);
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
public void testLinkageError() throws Exception {
|
||||
JavaClassLoader javaClassLoader = new JavaClassLoader(null, "./test-data/javacl-sources/", "") {
|
||||
@Override
|
||||
@ -102,9 +102,10 @@ public class JavaClassLoaderTest {
|
||||
System.out.println(o.toString());
|
||||
}
|
||||
|
||||
private void modifyFile(String path) {
|
||||
private void modifyFile(String path) throws InterruptedException {
|
||||
Thread.sleep(1000l);
|
||||
File file = new File(path);
|
||||
file.setLastModified(System.currentTimeMillis());
|
||||
boolean result = file.setLastModified(System.currentTimeMillis());
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user