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 2022/11/07 14:32:02 UTC
[plc4x] branch develop updated: test(plc4j/bacnet): only print hexdump diffs on testfail [skip ci]
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 9f1ad79c78 test(plc4j/bacnet): only print hexdump diffs on testfail [skip ci]
9f1ad79c78 is described below
commit 9f1ad79c7825d875c3e9e8e4817903804bbf8dca
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Mon Nov 7 15:31:53 2022 +0100
test(plc4j/bacnet): only print hexdump diffs on testfail [skip ci]
---
.../java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java b/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
index e7c03127d9..4dd45cbfe9 100644
--- a/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
+++ b/plc4j/drivers/bacnet/src/test/java/org/apache/plc4x/java/bacnetip/RandomPackagesTest.java
@@ -6058,8 +6058,10 @@ public class RandomPackagesTest {
@SuppressWarnings("redundant")
byte[] expectedBytes = rawData;
byte[] actualBytes = writeBuffer.getBytes();
- // This goes to std out on purpose to preserve coloring
- System.out.println(HexDiff.diffHex(expectedBytes, actualBytes));
+ if (!Arrays.equals(expectedBytes, actualBytes)) {
+ // This goes to std out on purpose to preserve coloring
+ System.out.println(HexDiff.diffHex(expectedBytes, actualBytes));
+ }
assertThat(actualBytes)
.withRepresentation(HexadecimalRepresentation.HEXA_REPRESENTATION)
.describedAs("re-serialized output doesn't match original bytes:%s\n", bvlc)