You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/10/29 22:08:10 UTC
[camel-quarkus] branch master updated: Fix #270 TarfileTest can
fail on exotic platforms
This is an automated email from the ASF dual-hosted git repository.
lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new 44d18e8 Fix #270 TarfileTest can fail on exotic platforms
44d18e8 is described below
commit 44d18e8b0344b0df82c5e47d25d47e09dca1023d
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Oct 29 13:19:23 2019 +0100
Fix #270 TarfileTest can fail on exotic platforms
---
.../org/apache/camel/quarkus/component/tarfile/it/TarfileTest.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/integration-tests/tarfile/src/test/java/org/apache/camel/quarkus/component/tarfile/it/TarfileTest.java b/integration-tests/tarfile/src/test/java/org/apache/camel/quarkus/component/tarfile/it/TarfileTest.java
index 872d334..ee4f9d5 100644
--- a/integration-tests/tarfile/src/test/java/org/apache/camel/quarkus/component/tarfile/it/TarfileTest.java
+++ b/integration-tests/tarfile/src/test/java/org/apache/camel/quarkus/component/tarfile/it/TarfileTest.java
@@ -35,10 +35,12 @@ class TarfileTest {
@Test
public void test() throws Exception {
+ final String encoding = "utf-8";
+
byte[] body;
ExtractableResponse response = RestAssured.given() //
- .contentType(ContentType.TEXT).body("Hello World").post("/tarfile/post") //
+ .contentType(ContentType.TEXT + "; charset=" + encoding).body("Hello World").post("/tarfile/post") //
.then().extract();
body = response.body().asByteArray();
@@ -53,7 +55,7 @@ class TarfileTest {
IOHelper.copy(tis, bos);
}
- String str = bos.toString();
+ String str = bos.toString(encoding);
Assertions.assertEquals("Hello World", str);
}