use of kieker.common.record.tcp.SingleSocketRecordReader in project iobserve-analysis by research-iobserve.
the class TcpProbeControllerTest method init.
/**
* Initiates all necessary things like the ProbeController and the TestListener for Receiving
* other things.
*/
@BeforeClass
public static void init() {
TcpProbeControllerTest.tcpProbeController = new TcpProbeController();
TcpProbeControllerTest.listener = new TestListener();
TcpProbeControllerTest.tcpReader = new SingleSocketRecordReader(TcpProbeControllerTest.PORT, TcpProbeControllerTest.BUFFER_SIZE, TcpProbeControllerTest.LOGGER, TcpProbeControllerTest.listener);
new Thread(TcpProbeControllerTest.tcpReader).start();
try {
// TODO we must wait until the reader is up. This is not a unit test. Either rewriter
// as unit test using powermock or transform into integration test
Thread.sleep(10000);
} catch (final InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
use of kieker.common.record.tcp.SingleSocketRecordReader in project iobserve-analysis by research-iobserve.
the class ProbeControlFilterTest method setUp.
/**
* Setup the test.
*/
@Before
public void setUp() {
synchronized (this) {
final IRecordReceivedListener listener = new IRecordReceivedListener() {
@Override
public void onRecordReceived(final IMonitoringRecord record) {
// do nothing.. the TCP sender is tested elsewhere
}
};
ProbeControlFilterTest.port++;
this.tcpReader = new SingleSocketRecordReader(ProbeControlFilterTest.port, ProbeControlFilterTest.BUFFER_SIZE, ProbeControlFilterTest.LOGGER, listener);
new Thread(this.tcpReader).start();
this.probeControlFilter = new ProbeControlFilter();
}
}
Aggregations