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/07 06:34:37 UTC
[incubator-tuweni] branch master updated (dade370 -> bd7c688)
This is an automated email from the ASF dual-hosted git repository.
toulmean pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git.
from dade370 use absolute path for distribution folder
new afd34d2 Support paths with spaces
new bd7c688 add a java test for sanity
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../org/apache/tuweni/dist/DistributionTest.java | 8 ++++++-
.../apache/tuweni/discovery/DiscoveryAPITest.java | 25 ++++++++++++++++------
2 files changed, 25 insertions(+), 8 deletions(-)
copy devp2p/src/integrationTest/java/org/apache/tuweni/devp2p/v5/NodeDiscoveryServiceTest.java => dns-discovery/src/integrationTest/java/org/apache/tuweni/discovery/DiscoveryAPITest.java (61%)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org
[incubator-tuweni] 02/02: add a java test for sanity
Posted by to...@apache.org.
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
commit bd7c688d9e9675aefb53870f88870f8c7b065ddf
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Wed May 6 23:34:21 2020 -0700
add a java test for sanity
---
.../apache/tuweni/discovery/DiscoveryAPITest.java | 41 ++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/dns-discovery/src/integrationTest/java/org/apache/tuweni/discovery/DiscoveryAPITest.java b/dns-discovery/src/integrationTest/java/org/apache/tuweni/discovery/DiscoveryAPITest.java
new file mode 100644
index 0000000..80ea34d
--- /dev/null
+++ b/dns-discovery/src/integrationTest/java/org/apache/tuweni/discovery/DiscoveryAPITest.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE
+ * file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file
+ * to You 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 org.apache.tuweni.discovery;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import org.apache.tuweni.devp2p.EthereumNodeRecord;
+import org.apache.tuweni.junit.BouncyCastleExtension;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+
+@ExtendWith(BouncyCastleExtension.class)
+class DiscoveryAPITest {
+
+ @Test
+ void resolveNames() {
+ DNSResolver resolver = new DNSResolver();
+ List<EthereumNodeRecord> nodes = new ArrayList<>();
+ DNSVisitor visitor = enr -> {
+ nodes.add(enr);
+ return false;
+ };
+ resolver
+ .visitTree("enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net", visitor);
+ assertTrue(nodes.size() > 0);
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org
[incubator-tuweni] 01/02: Support paths with spaces
Posted by to...@apache.org.
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
commit afd34d2cef340eecfe59a8476ba55e774f87f061
Author: Antoine Toulme <an...@lunar-ocean.com>
AuthorDate: Wed May 6 23:34:00 2020 -0700
Support paths with spaces
---
.../java/org/apache/tuweni/dist/DistributionTest.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/dist/src/integrationTest/java/org/apache/tuweni/dist/DistributionTest.java b/dist/src/integrationTest/java/org/apache/tuweni/dist/DistributionTest.java
index 9996ba4..270d159 100644
--- a/dist/src/integrationTest/java/org/apache/tuweni/dist/DistributionTest.java
+++ b/dist/src/integrationTest/java/org/apache/tuweni/dist/DistributionTest.java
@@ -16,6 +16,7 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
import java.io.File;
import java.io.IOException;
+import java.net.URISyntaxException;
import java.nio.file.Path;
import java.util.Enumeration;
import java.util.HashMap;
@@ -33,7 +34,12 @@ import org.junit.jupiter.api.Test;
class DistributionTest {
private static Path distributionsFolder() {
- File currentFile = new File(DistributionTest.class.getProtectionDomain().getCodeSource().getLocation().getPath());
+ File currentFile = null;
+ try {
+ currentFile = new File(DistributionTest.class.getProtectionDomain().getCodeSource().getLocation().toURI());
+ } catch (URISyntaxException e) {
+ throw new RuntimeException(e);
+ }
// dist/build/classes/java/org/apache/tuweni/dist
Path parentFolder = currentFile.toPath();
while (!"dist".equals(parentFolder.getFileName().toString()) && parentFolder.getParent() != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org