-
Notifications
You must be signed in to change notification settings - Fork 350
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com> Signed-off-by: Oleh Dokuka <odokuka@vmware.com> Signed-off-by: Oleh Dokuka <oleh.dokuka@icloud.com>
- Loading branch information
1 parent
6047692
commit 6aa3d8a
Showing
16 changed files
with
593 additions
and
557 deletions.
There are no files selected for viewing
495 changes: 266 additions & 229 deletions
495
rsocket-test/src/main/java/io/rsocket/test/TransportTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
...t-aeron/src/test/java/io/rsocket/transport/aeron/AeronWithFragmentationTransportTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
/* | ||
* Copyright 2015-present the original author or authors. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.rsocket.transport.aeron; | ||
|
||
import io.aeron.Aeron; | ||
import io.aeron.driver.MediaDriver; | ||
import io.aeron.driver.ThreadingMode; | ||
import io.rsocket.test.TransportTest; | ||
import java.net.InetSocketAddress; | ||
import java.time.Duration; | ||
import java.util.concurrent.ThreadLocalRandom; | ||
import org.junit.jupiter.api.Disabled; | ||
|
||
@Disabled | ||
final class AeronWithFragmentationTransportTest | ||
extends TransportTest<InetSocketAddress, AeronServer> { | ||
|
||
static final MediaDriver mediaDriver = | ||
MediaDriver.launch( | ||
new MediaDriver.Context().threadingMode(ThreadingMode.DEDICATED).dirDeleteOnStart(true)); | ||
|
||
static final Aeron clientAeron = Aeron.connect(); | ||
static final Aeron serverAeron = Aeron.connect(); | ||
static final EventLoopGroup eventLoopGroup = EventLoopGroup.create(4); | ||
|
||
@Override | ||
protected TransportPair<InetSocketAddress, AeronServer> createTransportPair() { | ||
return new AeronTransportPair(mediaDriver, clientAeron, serverAeron); | ||
} | ||
|
||
static class AeronTransportPair extends TransportPair<InetSocketAddress, AeronServer> { | ||
|
||
final MediaDriver mediaDriver; | ||
final Aeron clientAeron; | ||
final Aeron serverAeron; | ||
|
||
public AeronTransportPair(MediaDriver driver, Aeron clientAeron, Aeron serverAeron) { | ||
super( | ||
() -> | ||
InetSocketAddress.createUnresolved( | ||
"0.0.0.0", ThreadLocalRandom.current().nextInt(20000) + 5000), | ||
(address, server, allocator) -> | ||
AeronClientTransport.createIpc(clientAeron, eventLoopGroup), | ||
(address, allocator) -> AeronServerTransport.createIpc(serverAeron, eventLoopGroup), | ||
true, | ||
false, | ||
false, | ||
Duration.ofMinutes(2)); | ||
this.mediaDriver = driver; | ||
this.clientAeron = clientAeron; | ||
this.serverAeron = serverAeron; | ||
} | ||
|
||
@Override | ||
public void dispose() { | ||
super.dispose(); | ||
// CloseHelper.quietCloseAll(clientAeron, serverAeron); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.