You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuweni.apache.org by to...@apache.org on 2020/05/09 05:53:29 UTC
[incubator-tuweni] branch master updated: Fix Windows Tests (#82)
This is an automated email from the ASF dual-hosted git repository.
toulmean pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
The following commit(s) were added to refs/heads/master by this push:
new 19725a3 Fix Windows Tests (#82)
19725a3 is described below
commit 19725a3452acec93d855e2e29b2c431d8e179053
Author: Danno Ferrin <da...@gmail.com>
AuthorDate: Fri May 8 23:53:23 2020 -0600
Fix Windows Tests (#82)
Fix two issues breaking windows tests:
* Explicitly make hobbits UPD tests bind to 127.0.0.1 instead of 0.0.0.0.
Windows does not easily support binding to multiple interfaes for listening.
* Rely on java native URL creation for file resource tests.
Signed-off-by: Danno Ferrin <da...@gmail.com>
---
.../kotlin/org/apache/tuweni/hobbits/InteractionTest.kt | 12 ++++++------
.../kotlin/org/apache/tuweni/hobbits/RelayerTest.kt | 2 +-
io/src/test/java/org/apache/tuweni/io/ResourcesTest.java | 4 ++--
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/InteractionTest.kt b/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/InteractionTest.kt
index 705538f..0c46e2b 100644
--- a/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/InteractionTest.kt
+++ b/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/InteractionTest.kt
@@ -177,11 +177,11 @@ class UDPTest {
val client2 = HobbitsTransport(vertx)
runBlocking {
- client1.createUDPEndpoint("foo", port = 15000, handler = ref::set)
+ client1.createUDPEndpoint("foo", "localhost", 15000, ref::set)
client1.start()
client2.start()
client2.sendMessage(Message(protocol = Protocol.PING, body = Bytes.fromHexString("deadbeef"),
- headers = Bytes.random(16)), Transport.UDP, "0.0.0.0", 15000)
+ headers = Bytes.random(16)), Transport.UDP, "localhost", 15000)
}
Thread.sleep(200)
assertEquals(Bytes.fromHexString("deadbeef"), ref.get().body)
@@ -196,20 +196,20 @@ class UDPTest {
val client1 = HobbitsTransport(vertx)
val client2 = HobbitsTransport(vertx)
runBlocking {
- client1.createUDPEndpoint("foo", port = 16000, handler = ref::set)
- client1.createUDPEndpoint("bar", port = 16001, handler = ref2::set)
+ client1.createUDPEndpoint("foo", "localhost", 16000, ref::set)
+ client1.createUDPEndpoint("bar", "localhost", 16001, ref2::set)
client1.start()
client2.start()
client2.sendMessage(
Message(protocol = Protocol.PING, body = Bytes.fromHexString("deadbeef"), headers = Bytes.random(16)),
Transport.UDP,
- "0.0.0.0",
+ "localhost",
16000
)
client2.sendMessage(
Message(protocol = Protocol.PING, body = Bytes.fromHexString("deadbeef"), headers = Bytes.random(16)),
Transport.UDP,
- "0.0.0.0",
+ "localhost",
16001
)
}
diff --git a/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/RelayerTest.kt b/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/RelayerTest.kt
index e33f20a..74bba8d 100644
--- a/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/RelayerTest.kt
+++ b/hobbits/src/integrationTest/kotlin/org/apache/tuweni/hobbits/RelayerTest.kt
@@ -84,7 +84,7 @@ class RelayerTest {
val ref = AtomicReference<Message>()
val client1 = HobbitsTransport(vertx)
val client2 = HobbitsTransport(vertx)
- val relayer = Relayer(vertx, "udp://localhost:12000", "udp://0.0.0.0:10000", { })
+ val relayer = Relayer(vertx, "udp://localhost:12000", "udp://localhost:10000", { })
runBlocking {
client1.createUDPEndpoint("foo", port = 10000, handler = ref::set)
client1.start()
diff --git a/io/src/test/java/org/apache/tuweni/io/ResourcesTest.java b/io/src/test/java/org/apache/tuweni/io/ResourcesTest.java
index 991b91e..faa5069 100644
--- a/io/src/test/java/org/apache/tuweni/io/ResourcesTest.java
+++ b/io/src/test/java/org/apache/tuweni/io/ResourcesTest.java
@@ -90,8 +90,8 @@ class ResourcesTest {
URLClassLoader classLoader = new URLClassLoader(
new URL[] {
- new URL("file:" + folder.toString() + "/"),
- new URL("file:" + folder.resolve("resourceresolvertest.jar").toString())});
+ folder.toUri().toURL(),
+ folder.resolve("resourceresolvertest.jar").toUri().toURL()});
List<URL> all =
Resources.find(classLoader, "/org/apache/tuweni/io/file/resourceresolver/**").collect(Collectors.toList());
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org