forked from I2P_Developers/i2p.i2p
Tests: Fix streaming integration tests after access filtering changes
This commit is contained in:
@ -11,6 +11,7 @@ import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.client.streaming.IncomingConnectionFilter;
|
||||
import net.i2p.util.Log;
|
||||
/**
|
||||
* Have a client connect to a server, where the server waits 5
|
||||
@ -61,7 +62,8 @@ public class ConnectCloseIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("* manager created");
|
||||
I2PServerSocket ssocket = mgr.getServerSocket();
|
||||
_log.debug("* server socket created");
|
||||
@ -87,7 +89,8 @@ public class ConnectCloseIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("* manager created");
|
||||
I2PSocket socket = mgr.connect(_server.getMyDestination());
|
||||
_log.debug("* socket created");
|
||||
|
@ -10,6 +10,7 @@ import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.client.streaming.IncomingConnectionFilter;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
@ -64,7 +65,8 @@ public class ConnectIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PServerSocket ssocket = mgr.getServerSocket();
|
||||
_log.debug("server socket created");
|
||||
@ -89,7 +91,8 @@ public class ConnectIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PSocket socket = mgr.connect(_server.getMyDestination());
|
||||
_log.debug("socket created");
|
||||
|
@ -10,6 +10,7 @@ import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.client.streaming.IncomingConnectionFilter;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
@ -60,7 +61,8 @@ public class ConnectInactivityIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PServerSocket ssocket = mgr.getServerSocket();
|
||||
_log.debug("server socket created");
|
||||
@ -86,7 +88,8 @@ public class ConnectInactivityIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PSocket socket = mgr.connect(_server.getMyDestination());
|
||||
_log.debug("socket created");
|
||||
|
@ -12,6 +12,7 @@ import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.client.streaming.IncomingConnectionFilter;
|
||||
import net.i2p.data.DataHelper;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
@ -64,7 +65,8 @@ public class EchoIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PServerSocket ssocket = mgr.getServerSocket();
|
||||
_log.debug("server socket created");
|
||||
@ -110,7 +112,8 @@ public class EchoIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PSocket socket = mgr.connect(_server.getMyDestination());
|
||||
_log.debug("socket created");
|
||||
|
@ -12,6 +12,7 @@ import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.streaming.I2PSocket;
|
||||
import net.i2p.client.streaming.I2PServerSocket;
|
||||
import net.i2p.client.streaming.I2PSocketManager;
|
||||
import net.i2p.client.streaming.IncomingConnectionFilter;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
/**
|
||||
@ -64,7 +65,8 @@ public class EchoLargeIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PServerSocket ssocket = mgr.getServerSocket();
|
||||
_log.debug("server socket created");
|
||||
@ -110,7 +112,8 @@ public class EchoLargeIT extends StreamingITBase {
|
||||
public void run() {
|
||||
try {
|
||||
Properties opts = new Properties();
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(_context, _session, opts, "client");
|
||||
I2PSocketManager mgr = new I2PSocketManagerFull(
|
||||
_context, _session, opts, "client", IncomingConnectionFilter.ALLOW);
|
||||
_log.debug("manager created");
|
||||
I2PSocket socket = mgr.connect(_server.getMyDestination());
|
||||
_log.debug("socket created");
|
||||
|
@ -12,6 +12,7 @@ import net.i2p.I2PAppContext;
|
||||
import net.i2p.client.I2PClient;
|
||||
import net.i2p.client.I2PClientFactory;
|
||||
import net.i2p.client.I2PSession;
|
||||
import net.i2p.client.streaming.IncomingConnectionFilter;
|
||||
|
||||
public class PingIT extends TestCase {
|
||||
|
||||
@ -19,7 +20,8 @@ public class PingIT extends TestCase {
|
||||
public void test() throws Exception {
|
||||
I2PAppContext context = I2PAppContext.getGlobalContext();
|
||||
I2PSession session = createSession();
|
||||
ConnectionManager mgr = new ConnectionManager(context, session, new ConnectionOptions());
|
||||
ConnectionManager mgr = new ConnectionManager(
|
||||
context, session, new ConnectionOptions(), IncomingConnectionFilter.ALLOW);
|
||||
for (int i = 0; i < 10; i++) {
|
||||
boolean ponged = mgr.ping(session.getMyDestination(), 2*1000);
|
||||
assertTrue(ponged);
|
||||
|
@ -6,6 +6,7 @@
|
||||
- Temporarily mitigate discrepancy between Ant and Gradle in
|
||||
SingleFileNamingServiceTest
|
||||
- Unify core test resources across JUnit and ScalaTest
|
||||
- Fix streaming integration tests after access filtering changes
|
||||
|
||||
2019-08-05 zzz
|
||||
* i2ptunnel:
|
||||
|
Reference in New Issue
Block a user