diff --git a/core/java/.classpath b/core/java/.classpath index a2a2a595a3f1b9a5bf216529e4da3c60dd8213ca..5ed3d26f7b6c57ee8d1af09313283698e5594700 100644 --- a/core/java/.classpath +++ b/core/java/.classpath @@ -4,5 +4,6 @@ <classpathentry kind="src" path="test/junit"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> + <classpathentry kind="lib" path="../../installer/resources"/> <classpathentry kind="output" path="build/obj"/> </classpath> diff --git a/core/java/build.xml b/core/java/build.xml index 289f84d6ec41a7f22237cc1afedac7ad79c70e88..970f9efd58c3edf3f8266500a225415dcb533885 100644 --- a/core/java/build.xml +++ b/core/java/build.xml @@ -213,6 +213,7 @@ <junit printsummary="withOutAndErr" fork="yes" maxmemory="384m" showoutput="yes" > <sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" /> <classpath> + <pathelement location="../../installer/resources/" /> <pathelement path="${classpath}" /> <pathelement location="${hamcrest.home}/hamcrest-core.jar" /> <pathelement location="${hamcrest.home}/hamcrest-library.jar" /> diff --git a/core/java/test/junit/net/i2p/client/naming/BlockfileNamingServiceTest.java b/core/java/test/junit/net/i2p/client/naming/BlockfileNamingServiceTest.java index 229528e41bae14ac931b700795ab0588c3b711bd..6df39002d1cf7b0e4fbc95dcfc50a1545d771458 100644 --- a/core/java/test/junit/net/i2p/client/naming/BlockfileNamingServiceTest.java +++ b/core/java/test/junit/net/i2p/client/naming/BlockfileNamingServiceTest.java @@ -1,11 +1,10 @@ package net.i2p.client.naming; import junit.framework.TestCase; -import static org.junit.Assert.*; -import static org.hamcrest.CoreMatchers.*; import java.io.File; import java.io.IOException; +import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; import java.util.List; @@ -26,7 +25,9 @@ public class BlockfileNamingServiceTest extends TestCase { _names = null; Properties props = new Properties(); try { - DataHelper.loadProps(props, new File("../../installer/resources/hosts.txt"), true); + InputStream is = getClass().getResourceAsStream("/hosts.txt"); + assertNotNull("test classpath not set correctly",is); + DataHelper.loadProps(props, is, true); _names = new ArrayList(props.keySet()); Collections.shuffle(_names); } catch (IOException ioe) {