This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new e342fb56e02 Change the path of the large file written and make the URL
for the large body test match (#1416)
e342fb56e02 is described below
commit e342fb56e02ee18b33add1304a1408354a9fa0ca
Author: Tom Cunningham <[email protected]>
AuthorDate: Sat Apr 5 04:53:05 2025 -0400
Change the path of the large file written and make the URL for the large
body test match (#1416)
---
.../http/springboot/SpringBootPlatformHttpCertificationTest.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git
a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCertificationTest.java
b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCertificationTest.java
index 5f9934ea4d1..1ad0f93b34e 100644
---
a/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCertificationTest.java
+++
b/components-starter/camel-platform-http-starter/src/test/java/org/apache/camel/component/platform/http/springboot/SpringBootPlatformHttpCertificationTest.java
@@ -16,6 +16,7 @@
*/
package org.apache.camel.component.platform.http.springboot;
+import java.io.BufferedOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -306,16 +307,16 @@ public class SpringBootPlatformHttpCertificationTest
extends PlatformHttpBase {
camelContext.getStreamCachingStrategy().setSpoolEnabled(true);
Path input = createLargeFile();
- Path output = Files.createTempFile("platform-http-output", "dat");
+ Path output = Files.createTempFile(Path.of("target"),
"platform-http-output", "dat");
InputStream response = given()
.body(new FileInputStream(input.toFile()))
- .post("/streaming")
+ .post("/streamingWithLargeRequestAndResponseBody")
.then()
.extract()
.asInputStream();
- try (FileOutputStream fos = new FileOutputStream(output.toFile())) {
+ try (BufferedOutputStream fos = new BufferedOutputStream(new
FileOutputStream(output.toFile())); response) {
IOHelper.copy(response, fos);
}
@@ -324,7 +325,7 @@ public class SpringBootPlatformHttpCertificationTest
extends PlatformHttpBase {
private Path createLargeFile() throws IOException {
// Create a 4GB file containing random data
- Path path = Files.createTempFile("platform-http-input", "dat");
+ Path path = Files.createTempFile(Path.of("target"),
"platform-http-input", "dat");
try (FileOutputStream fos = new FileOutputStream(path.toFile())) {
Random random = new Random();
long targetFileSize = (long) (4 * Math.pow(1024, 3));