Fix tests for JavaClassLoader #PL-1977

This commit is contained in:
Eugeny Degtyarjov 2013-03-26 18:37:31 +00:00
parent b74d77faf2
commit 22cb1918c9

View File

@ -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());
}