Search in sources :

Example 6 with RedirectingNameResolver

use of io.aeron.test.driver.RedirectingNameResolver in project Aeron by real-logic.

the class NameReResolutionTest method before.

@BeforeEach
void before() {
    assumeBindAddressAvailable("127.0.0.1");
    assumeBindAddressAvailable("127.0.0.2");
    final MediaDriver.Context context = new MediaDriver.Context().publicationTermBufferLength(LogBufferDescriptor.TERM_MIN_LENGTH).dirDeleteOnStart(true).threadingMode(ThreadingMode.SHARED).nameResolver(new RedirectingNameResolver(STUB_LOOKUP_CONFIGURATION));
    try {
        driver = TestMediaDriver.launch(context, systemTestWatcher);
    } finally {
        systemTestWatcher.dataCollector().add(context.aeronDirectory());
    }
    client = Aeron.connect(new Aeron.Context().aeronDirectoryName(context.aeronDirectoryName()));
    countersReader = client.countersReader();
}
Also used : TestMediaDriver(io.aeron.test.driver.TestMediaDriver) MediaDriver(io.aeron.driver.MediaDriver) RedirectingNameResolver(io.aeron.test.driver.RedirectingNameResolver) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

RedirectingNameResolver (io.aeron.test.driver.RedirectingNameResolver)6 MediaDriver (io.aeron.driver.MediaDriver)4 File (java.io.File)3 CommonContext (io.aeron.CommonContext)2 AeronCluster (io.aeron.cluster.client.AeronCluster)2 ClusteredServiceContainer (io.aeron.cluster.service.ClusteredServiceContainer)2 DirectBuffer (org.agrona.DirectBuffer)2 Test (org.junit.jupiter.api.Test)2 Archive (io.aeron.archive.Archive)1 ArchiveThreadingMode (io.aeron.archive.ArchiveThreadingMode)1 ArchivingMediaDriver (io.aeron.archive.ArchivingMediaDriver)1 AeronArchive (io.aeron.archive.client.AeronArchive)1 EgressListener (io.aeron.cluster.client.EgressListener)1 ClientSession (io.aeron.cluster.service.ClientSession)1 ThreadingMode (io.aeron.driver.ThreadingMode)1 TimeoutException (io.aeron.exceptions.TimeoutException)1 Header (io.aeron.logbuffer.Header)1 io.aeron.test (io.aeron.test)1 StubClusteredService (io.aeron.test.cluster.StubClusteredService)1 TestCluster (io.aeron.test.cluster.TestCluster)1