This is an automated email from the ASF dual-hosted git repository.
reta pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cxf.git
The following commit(s) were added to refs/heads/main by this push:
new f269e2ed9b Attempt to fix
org.apache.cxf.systest.jaxrs.nio.NioBookStoreTest.testPostBookStore test case
on Windows
f269e2ed9b is described below
commit f269e2ed9b19a7ef8a5921ae0d61eeaa09a6a501
Author: Andriy Redko <[email protected]>
AuthorDate: Fri Jul 7 15:16:06 2023 -0400
Attempt to fix
org.apache.cxf.systest.jaxrs.nio.NioBookStoreTest.testPostBookStore test case
on Windows
---
.../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 0c3a9e2896..01ecb99766 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
@@ -70,11 +70,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"));
}
}