forked from I2P_Developers/i2p.i2p
add installer/resources to the classpath for eclipse and junit task
do not use hardcoded filesystem path in junit test (test still fails for different reason)
This commit is contained in:
@ -4,5 +4,6 @@
|
|||||||
<classpathentry kind="src" path="test/junit"/>
|
<classpathentry kind="src" path="test/junit"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
|
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
|
||||||
|
<classpathentry kind="lib" path="../../installer/resources"/>
|
||||||
<classpathentry kind="output" path="build/obj"/>
|
<classpathentry kind="output" path="build/obj"/>
|
||||||
</classpath>
|
</classpath>
|
||||||
|
@ -213,6 +213,7 @@
|
|||||||
<junit printsummary="withOutAndErr" fork="yes" maxmemory="384m" showoutput="yes" >
|
<junit printsummary="withOutAndErr" fork="yes" maxmemory="384m" showoutput="yes" >
|
||||||
<sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" />
|
<sysproperty key="net.sourceforge.cobertura.datafile" file="./cobertura.ser" />
|
||||||
<classpath>
|
<classpath>
|
||||||
|
<pathelement location="../../installer/resources/" />
|
||||||
<pathelement path="${classpath}" />
|
<pathelement path="${classpath}" />
|
||||||
<pathelement location="${hamcrest.home}/hamcrest-core.jar" />
|
<pathelement location="${hamcrest.home}/hamcrest-core.jar" />
|
||||||
<pathelement location="${hamcrest.home}/hamcrest-library.jar" />
|
<pathelement location="${hamcrest.home}/hamcrest-library.jar" />
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
package net.i2p.client.naming;
|
package net.i2p.client.naming;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
import static org.junit.Assert.*;
|
|
||||||
import static org.hamcrest.CoreMatchers.*;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -26,7 +25,9 @@ public class BlockfileNamingServiceTest extends TestCase {
|
|||||||
_names = null;
|
_names = null;
|
||||||
Properties props = new Properties();
|
Properties props = new Properties();
|
||||||
try {
|
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());
|
_names = new ArrayList(props.keySet());
|
||||||
Collections.shuffle(_names);
|
Collections.shuffle(_names);
|
||||||
} catch (IOException ioe) {
|
} catch (IOException ioe) {
|
||||||
|
Reference in New Issue
Block a user