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/06/27 07:49:25 UTC
[incubator-tuweni] branch master updated: Reenable two thirds (#96)
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 dcb5874 Reenable two thirds (#96)
dcb5874 is described below
commit dcb5874502d1d6f9257e974011d05153ed46be8a
Author: Antoine Toulme <at...@users.noreply.github.com>
AuthorDate: Sat Jun 27 00:49:15 2020 -0700
Reenable two thirds (#96)
Reenable most discovery tests. The ones left disabled block the build because they try to connect to 0.0.0.0.
---
.github/workflows/master-pr-build.yml | 10 ++++++--
build.gradle | 23 ++++++++----------
.../devp2p/v5/internal/DefaultUdpConnectorTest.kt | 10 ++------
.../tuweni/discoveryint/DiscoveryAPITest.java | 2 +-
.../org/apache/tuweni/discovery/DNSResolverTest.kt | 2 ++
.../src/integrationTest/resources/logback.xml | 27 ++++++++++++++++++++++
6 files changed, 49 insertions(+), 25 deletions(-)
diff --git a/.github/workflows/master-pr-build.yml b/.github/workflows/master-pr-build.yml
index 1ee27b3..00c2949 100644
--- a/.github/workflows/master-pr-build.yml
+++ b/.github/workflows/master-pr-build.yml
@@ -129,6 +129,8 @@ jobs:
path: "**/build/reports"
- name: Upload to Codecov
uses: codecov/codecov-action@v1
+ with:
+ flags: unit
integration-tests:
runs-on: ubuntu-latest
container:
@@ -153,9 +155,13 @@ jobs:
uses: eskatos/gradle-command-action@v1
with:
gradle-version: 6.3
- arguments: integrationTest
+ arguments: integrationTest jacocoTestReport
- name: Upload test reports
uses: actions/upload-artifact@v2
with:
name: Reports
- path: "**/build/reports"
\ No newline at end of file
+ path: "**/build/reports"
+ - name: Upload to Codecov
+ uses: codecov/codecov-action@v1
+ with:
+ flags: integration
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index f4bfb6b..68442a6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -191,6 +191,7 @@ subprojects {
useJUnitPlatform() { includeEngines 'spek', 'junit-jupiter' }
timeout = Duration.ofMinutes(30)
+
}
rootProject.integrationTest.dependsOn integrationTest
@@ -282,13 +283,6 @@ allprojects {
disableWarningsInGeneratedCode = true
}
-
- jacocoTestReport {
- reports {
- xml.enabled true
- html.enabled true
- }
- }
}
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
@@ -301,13 +295,6 @@ allprojects {
'-Xuse-experimental=kotlin.Experimental'
]
}
-
- jacocoTestReport {
- reports {
- xml.enabled true
- html.enabled true
- }
- }
}
@@ -319,6 +306,14 @@ allprojects {
timeout = Duration.ofMinutes(30)
}
+ jacocoTestReport {
+ reports {
+ xml.enabled true
+ html.enabled true
+ }
+ getExecutionData().setFrom(fileTree(buildDir).include("/jacoco/*.exec"))
+ }
+
//////
// Documentation
diff --git a/devp2p/src/integrationTest/kotlin/org/apache/tuweni/devp2p/v5/internal/DefaultUdpConnectorTest.kt b/devp2p/src/integrationTest/kotlin/org/apache/tuweni/devp2p/v5/internal/DefaultUdpConnectorTest.kt
index 93ea1d6..d538784 100644
--- a/devp2p/src/integrationTest/kotlin/org/apache/tuweni/devp2p/v5/internal/DefaultUdpConnectorTest.kt
+++ b/devp2p/src/integrationTest/kotlin/org/apache/tuweni/devp2p/v5/internal/DefaultUdpConnectorTest.kt
@@ -34,6 +34,7 @@ import org.junit.jupiter.api.AfterEach
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.BeforeEach
+import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.junit.jupiter.api.parallel.Execution
@@ -42,6 +43,7 @@ import java.net.InetAddress
import java.net.InetSocketAddress
import java.nio.ByteBuffer
+@Disabled
@ObsoleteCoroutinesApi
@ExtendWith(BouncyCastleExtension::class)
@Execution(ExecutionMode.SAME_THREAD)
@@ -128,27 +130,19 @@ class DefaultUdpConnectorTest {
}
}
}
- println("yup1")
connector!!.attachObserver(observer)
- println("yup2")
connector!!.start()
- println("yup3")
assertTrue(observer.result.isEmpty)
val codec = DefaultPacketCodec(
SECP256K1.KeyPair.random(),
RoutingTable(Bytes.random(32))
)
- println("yup4")
val socketChannel = CoroutineDatagramChannel.open()
- println("yup5")
val message = RandomMessage()
- println("yup6")
val encodedRandomMessage = codec.encode(message, Hash.sha2_256(connector!!.getEnrBytes()))
val buffer = ByteBuffer.wrap(encodedRandomMessage.content.toArray())
socketChannel.send(buffer, InetSocketAddress(InetAddress.getLoopbackAddress(), 9090))
- println("yup7")
val expectedResult = observer.result.receive()
- println("yup8")
assertEquals(expectedResult.data, message.data)
}
diff --git a/dns-discovery/src/integrationTest/java/org/apache/tuweni/discoveryint/DiscoveryAPITest.java b/dns-discovery/src/integrationTest/java/org/apache/tuweni/discoveryint/DiscoveryAPITest.java
index 6de5a8e..2d09fb8 100644
--- a/dns-discovery/src/integrationTest/java/org/apache/tuweni/discoveryint/DiscoveryAPITest.java
+++ b/dns-discovery/src/integrationTest/java/org/apache/tuweni/discoveryint/DiscoveryAPITest.java
@@ -37,7 +37,7 @@ class DiscoveryAPITest {
return false;
};
resolver
- .visitTree("enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.mainnet.ethdisco.net", visitor);
+ .visitTree("enrtree://AKA3AM6LPBYEUDMVNU3BSVQJ5AD45Y7YPOHJLEF6W26QOE4VTUDPE@all.goerli.ethdisco.net", visitor);
assertTrue(nodes.size() > 0);
}
}
diff --git a/dns-discovery/src/integrationTest/kotlin/org/apache/tuweni/discovery/DNSResolverTest.kt b/dns-discovery/src/integrationTest/kotlin/org/apache/tuweni/discovery/DNSResolverTest.kt
index fde7a9e..aa4a8bf 100644
--- a/dns-discovery/src/integrationTest/kotlin/org/apache/tuweni/discovery/DNSResolverTest.kt
+++ b/dns-discovery/src/integrationTest/kotlin/org/apache/tuweni/discovery/DNSResolverTest.kt
@@ -20,6 +20,7 @@ import org.apache.tuweni.devp2p.EthereumNodeRecord
import org.apache.tuweni.junit.BouncyCastleExtension
import org.junit.jupiter.api.Assertions.assertNotNull
import org.junit.jupiter.api.Assertions.assertTrue
+import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
@@ -50,6 +51,7 @@ class DNSResolverTest {
println(nodes.size)
}
+ @Disabled("too expensive for CI")
@Test
fun resolveAllMainnetNodes() {
val resolver = DNSResolver()
diff --git a/dns-discovery/src/integrationTest/resources/logback.xml b/dns-discovery/src/integrationTest/resources/logback.xml
new file mode 100644
index 0000000..cb63fd5
--- /dev/null
+++ b/dns-discovery/src/integrationTest/resources/logback.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+ 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.
+-->
+<configuration>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+ <!-- encoders are assigned the type
+ ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
+ <encoder>
+ <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
+ </encoder>
+ </appender>
+
+ <root level="info">
+ <appender-ref ref="STDOUT" />
+ </root>
+</configuration>
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org