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 2019/04/03 23:35:04 UTC

[incubator-tuweni] branch master updated: Add assumptions that sodium is present, so the build will pass on a blank jenkins box

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 756334d  Add assumptions that sodium is present, so the build will pass on a blank jenkins box
756334d is described below

commit 756334de71d5d837f1885da120a033ac9520c906
Author: Antoine Toulme <to...@apache.org>
AuthorDate: Wed Apr 3 16:34:46 2019 -0700

    Add assumptions that sodium is present, so the build will pass on a blank jenkins box
---
 .../tuweni/scuttlebutt/handshake/vertx/VertxIntegrationTest.java | 9 +++++++++
 .../apache/tuweni/scuttlebutt/rpc/PatchworkIntegrationTest.java  | 8 ++++++++
 2 files changed, 17 insertions(+)

diff --git a/scuttlebutt-handshake/src/test/java/org/apache/tuweni/scuttlebutt/handshake/vertx/VertxIntegrationTest.java b/scuttlebutt-handshake/src/test/java/org/apache/tuweni/scuttlebutt/handshake/vertx/VertxIntegrationTest.java
index 754477e..526dba3 100644
--- a/scuttlebutt-handshake/src/test/java/org/apache/tuweni/scuttlebutt/handshake/vertx/VertxIntegrationTest.java
+++ b/scuttlebutt-handshake/src/test/java/org/apache/tuweni/scuttlebutt/handshake/vertx/VertxIntegrationTest.java
@@ -16,10 +16,12 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 import org.apache.tuweni.bytes.Bytes;
 import org.apache.tuweni.bytes.Bytes32;
 import org.apache.tuweni.crypto.sodium.Signature;
+import org.apache.tuweni.crypto.sodium.Sodium;
 import org.apache.tuweni.junit.VertxExtension;
 import org.apache.tuweni.junit.VertxInstance;
 import org.apache.tuweni.scuttlebutt.rpc.RPCCodec;
@@ -33,6 +35,7 @@ import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.Consumer;
 
 import io.vertx.core.Vertx;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
 import org.logl.Level;
@@ -40,9 +43,15 @@ import org.logl.LoggerProvider;
 import org.logl.logl.SimpleLogger;
 import org.logl.vertx.LoglLogDelegateFactory;
 
+
 @ExtendWith(VertxExtension.class)
 class VertxIntegrationTest {
 
+  @BeforeAll
+  static void checkAvailable() {
+    assumeTrue(Sodium.isAvailable(), "Sodium native library is not available");
+  }
+
   private static class MyClientHandler implements ClientHandler {
 
 
diff --git a/scuttlebutt-rpc/src/test/java/org/apache/tuweni/scuttlebutt/rpc/PatchworkIntegrationTest.java b/scuttlebutt-rpc/src/test/java/org/apache/tuweni/scuttlebutt/rpc/PatchworkIntegrationTest.java
index 8495d2c..63b64a8 100644
--- a/scuttlebutt-rpc/src/test/java/org/apache/tuweni/scuttlebutt/rpc/PatchworkIntegrationTest.java
+++ b/scuttlebutt-rpc/src/test/java/org/apache/tuweni/scuttlebutt/rpc/PatchworkIntegrationTest.java
@@ -16,11 +16,13 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.junit.jupiter.api.Assertions.assertNotNull;
 import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assumptions.assumeTrue;
 
 import org.apache.tuweni.bytes.Bytes;
 import org.apache.tuweni.bytes.Bytes32;
 import org.apache.tuweni.concurrent.AsyncResult;
 import org.apache.tuweni.crypto.sodium.Signature;
+import org.apache.tuweni.crypto.sodium.Sodium;
 import org.apache.tuweni.io.Base64;
 import org.apache.tuweni.junit.VertxExtension;
 import org.apache.tuweni.junit.VertxInstance;
@@ -41,6 +43,7 @@ import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.google.common.base.Optional;
 import io.vertx.core.Vertx;
+import org.junit.jupiter.api.BeforeAll;
 import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.ExtendWith;
@@ -57,6 +60,11 @@ import org.logl.vertx.LoglLogDelegateFactory;
 @ExtendWith(VertxExtension.class)
 class PatchworkIntegrationTest {
 
+  @BeforeAll
+  static void checkAvailable() {
+    assumeTrue(Sodium.isAvailable(), "Sodium native library is not available");
+  }
+
   public static class MyClientHandler implements ClientHandler {
 
     private final Consumer<Bytes> sender;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tuweni.apache.org
For additional commands, e-mail: commits-help@tuweni.apache.org