You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/12/02 18:01:30 UTC

[plc4x] branch develop updated: fix(plc4j/bacnet): only run on systems with installed pcap

This is an automated email from the ASF dual-hosted git repository.

sruehl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
     new a3843b4  fix(plc4j/bacnet): only run on systems with installed pcap
a3843b4 is described below

commit a3843b480f623e60d685b85b4724055f7c0e8c4b
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Thu Dec 2 19:01:21 2021 +0100

    fix(plc4j/bacnet): only run on systems with installed pcap
---
 .../org/apache/plc4x/java/bacnetip/RandomPackagesTest.java  | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java b/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
index d5eae92..e85dead 100644
--- a/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
+++ b/sandbox/test-java-bacnetip-driver/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
@@ -51,6 +51,19 @@ import static org.junit.jupiter.api.Assertions.*;
 // Tests from http://kargs.net/captures
 public class RandomPackagesTest {
 
+    @BeforeAll
+    static void setUp() {
+        Assumptions.assumeTrue(() -> {
+            try {
+                System.out.println("Pcap version: " + Pcaps.libVersion());
+            } catch (Error e) {
+                e.printStackTrace();
+                return false;
+            }
+            return true;
+        }, "no pcap version on system");
+    }
+
     Queue<Closeable> toBeClosed = new ConcurrentLinkedDeque<>();
 
     @AfterEach