You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by re...@apache.org on 2023/07/08 14:00:35 UTC
[cxf] branch 3.6.x-fixes updated: Attempt to fix org.apache.cxf.systest.jaxrs.nio.NioBookStoreTest.testPostBookStore test case on Windows
This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch 3.6.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/3.6.x-fixes by this push:
new 90ec728367 Attempt to fix org.apache.cxf.systest.jaxrs.nio.NioBookStoreTest.testPostBookStore test case on Windows
90ec728367 is described below
commit 90ec7283673a9aae874b2d4e9a077701300ac0de
Author: Andriy Redko <dr...@gmail.com>
AuthorDate: Fri Jul 7 15:16:06 2023 -0400
Attempt to fix org.apache.cxf.systest.jaxrs.nio.NioBookStoreTest.testPostBookStore test case on Windows
(cherry picked from commit f269e2ed9b19a7ef8a5921ae0d61eeaa09a6a501)
---
.../test/java/org/apache/cxf/systest/jaxrs/nio/NioBookStoreTest.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/nio/NioBookStoreTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/nio/NioBookStoreTest.java
index aebf1ad2eb..bc69abc650 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/nio/NioBookStoreTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/nio/NioBookStoreTest.java
@@ -71,11 +71,12 @@ public class NioBookStoreTest extends AbstractBusClientServerTestBase {
@Test
public void testPostBookStore() throws IOException {
+ byte[] bytes = IOUtils.readBytesFromStream(getClass().getResourceAsStream("/files/books.txt"));
try (Response response = createWebClient("/bookstore", MediaType.TEXT_PLAIN)
.type(MediaType.TEXT_PLAIN)
- .post(IOUtils.readBytesFromStream(getClass().getResourceAsStream("/files/books.txt")))) {
+ .post(bytes)) {
assertEquals(200, response.getStatus());
- assertThat(response.readEntity(String.class), equalTo("Book Store uploaded: 10355 bytes"));
+ assertThat(response.readEntity(String.class), equalTo("Book Store uploaded: " + bytes.length + " bytes"));
}
}