Closed GoogleCodeExporter closed 9 years ago
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:39
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:40
I've added support for this now I think. Please try it out by depending on
2.4.1-SNAPSHOT after having added the following repo:
<repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots />
</repository>
</repositories>
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:48
I haven't tested it with large files/inputstreams so I'm still not sure if it
works
Original comment by johan.ha...@gmail.com
on 21 Mar 2015 at 5:49
I've tried the code from the 2.4.1-SNAPSHOT but it didn't work using the code
listed below:
given().spec(adminBasicAuth).content(new FileInputStream(new File(testFile))).when().put("/" + test_container + "/" +testFile);
and
given().spec(adminBasicAuth).content(new File(testFile)).when().put("/" + test_container + "/" +testFile);
I tried several test files with sizes of 157 bytes and 4GB. Would you please
confirm that the form of these commands is correct?
Original comment by siwarsha...@gmail.com
on 23 Mar 2015 at 8:40
Thanks for trying it out. It actually works for small files in my tests. Please
have a look at
https://github.com/jayway/rest-assured/blob/master/examples/rest-assured-itest-j
ava/src/test/java/com/jayway/restassured/itest/java/NonMultiPartUploadITest.java
. The actual services that handles the "file" request is a simple Scalatra
resource that is defined like this (same for post and put):
post("/file") {
val content: String = IOUtils.toString(request.getInputStream)
content
}
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 10:44
Also, what error do you get?
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 10:44
That works for small files, now I need to get it working with the large files.
Running into heap space error when running Eclipse project when uploading 1G
file. Once I get that resolved I'll try 4G and 6G files.
Original comment by siwarsha...@gmail.com
on 24 Mar 2015 at 2:26
Hmm I wonder why that is. It shouldn't need to copy everything into memory.
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 4:09
I found the source of the heap space error, it was in my code. After fixing it
I ran tests with 1Gb and 4Gb files -- no problems, it worked as advertised.
Thanks for your assistance, Johan.
Original comment by siwarsha...@gmail.com
on 24 Mar 2015 at 7:50
Great! Thanks for helping out and testing it.
Original comment by johan.ha...@gmail.com
on 24 Mar 2015 at 7:52
We've started using com.jayway.restassured:rest-assured:2.4.1 and this feature
no longer appears to work.
Original comment by siwarsha...@gmail.com
on 26 May 2015 at 8:19
Hmm but it worked in the snapshot version?
Original comment by johan.ha...@gmail.com
on 27 May 2015 at 6:16
[deleted comment]
Yes, the call hangs and we don't see a file transfer. Here's a code sample:
given().spec(adminAStorageAccessBasicAuth).
contentType(ContentType.BINARY).
content(new FileInputStream(file)).
when().
put(containerName + "/" + testFile4G).
then().
statusCode(201);
Original comment by siwarsha...@gmail.com
on 27 May 2015 at 3:25
Seems to work with small files, need to understand difference between a 25K and
4G file upload.
Original comment by siwarsha...@gmail.com
on 27 May 2015 at 3:50
I ran a series of tests with files ranging from 25K to 819M. The transfer rate
in our system was around 1MB/sec during the tests so a 4G file would take over
an hour to complete. No idea where there's a hangup, looking into it.
Original comment by siwarsha...@gmail.com
on 27 May 2015 at 4:44
Thanks. I don't think I've changed anything in the released version form the
snapshot.
Original comment by johan.ha...@gmail.com
on 27 May 2015 at 6:15
Original issue reported on code.google.com by
todd...@gmail.com
on 20 Mar 2015 at 7:13