Segment integration tests in router

This commit is contained in:
str4d
2017-12-02 20:48:53 +00:00
parent 10d5a17422
commit a65a498c86
8 changed files with 11 additions and 7 deletions

View File

@@ -10,6 +10,9 @@ sourceSets {
test { test {
java { java {
srcDir 'java/test/junit' srcDir 'java/test/junit'
exclude {
it.name.endsWith('IT.java')
}
} }
} }
} }

View File

@@ -279,6 +279,7 @@
<batchtest todir="../../reports/router/junit/"> <batchtest todir="../../reports/router/junit/">
<fileset dir="./test/junit"> <fileset dir="./test/junit">
<include name="**/*Test.java" /> <include name="**/*Test.java" />
<include name="**/*IT.java" if="runIntegrationTests" />
</fileset> </fileset>
</batchtest> </batchtest>
<formatter type="xml"/> <formatter type="xml"/>

View File

@@ -32,7 +32,7 @@ import net.i2p.router.RouterContext;
* 10 concurrent threads is, well, slow. * 10 concurrent threads is, well, slow.
* *
*/ */
public class BandwidthLimiterTest { public class BandwidthLimiterIT {
private static RouterContext _context; private static RouterContext _context;
private final static int NUM_KB = 256; private final static int NUM_KB = 256;
@@ -265,4 +265,4 @@ class FakeInputStream extends InputStream {
_numRead++; _numRead++;
return rv; return rv;
} }
} }

View File

@@ -14,7 +14,7 @@ import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
public abstract class GatewayTestBase extends RouterTestBase { public abstract class GatewayITBase extends RouterITBase {
private static TunnelGatewayPumper _pumper; private static TunnelGatewayPumper _pumper;

View File

@@ -15,7 +15,7 @@ import static junit.framework.TestCase.*;
* Quick unit test for base functionality of inbound tunnel * Quick unit test for base functionality of inbound tunnel
* operation * operation
*/ */
public class InboundGatewayTest extends GatewayTestBase { public class InboundGatewayIT extends GatewayITBase {
@Override @Override

View File

@@ -20,7 +20,7 @@ import static org.junit.Assert.assertTrue;
* operation * operation
* *
*/ */
public class InboundTest extends RouterTestBase { public class InboundIT extends RouterITBase {
@Test @Test
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")

View File

@@ -12,7 +12,7 @@ package net.i2p.router.tunnel;
* Quick unit test for base functionality of outbound tunnel * Quick unit test for base functionality of outbound tunnel
* operation * operation
*/ */
public class OutboundGatewayTest extends GatewayTestBase { public class OutboundGatewayIT extends GatewayITBase {
@Override @Override
protected void setupSenderAndReceiver() { protected void setupSenderAndReceiver() {

View File

@@ -13,7 +13,7 @@ import org.junit.BeforeClass;
* *
* @author zab * @author zab
*/ */
public abstract class RouterTestBase { public abstract class RouterITBase {
protected static RouterContext _context; protected static RouterContext _context;
protected static TunnelCreatorConfig _config; protected static TunnelCreatorConfig _config;