You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2021/03/18 08:42:45 UTC
[camel] branch master updated: Fixed CI test
This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 78d1cfb Fixed CI test
78d1cfb is described below
commit 78d1cfbc4359a3f1645eb770c3fc5185f0b83a8c
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Thu Mar 18 09:41:58 2021 +0100
Fixed CI test
---
.../camel/component/file/FileProducerCharsetUTFtoUTFTest.java | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoUTFTest.java b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoUTFTest.java
index 7474210..5ae128c 100644
--- a/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoUTFTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/component/file/FileProducerCharsetUTFtoUTFTest.java
@@ -22,8 +22,11 @@ import java.nio.file.Files;
import org.apache.camel.ContextTestSupport;
import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.util.ObjectHelper;
import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
/**
*
*/
@@ -33,13 +36,17 @@ public class FileProducerCharsetUTFtoUTFTest extends ContextTestSupport {
@Test
public void testFileProducerCharsetUTFtoUTF() throws Exception {
+ byte[] source = DATA.getBytes(StandardCharsets.UTF_8);
try (OutputStream fos = Files.newOutputStream(testFile("input.txt"))) {
- fos.write(DATA.getBytes(StandardCharsets.UTF_8));
+ fos.write(source);
}
oneExchangeDone.matchesWaitTime();
- assertFileExists(testFile("output.txt"), DATA);
+ assertFileExists(testFile("output.txt"));
+ byte[] target = Files.readAllBytes(testFile("output.txt"));
+
+ assertTrue(ObjectHelper.equalByteArray(source, target));
}
@Override