diff options
author | Shawn Pearce <spearce@spearce.org> | 2017-02-20 10:51:27 -0800 |
---|---|---|
committer | Shawn Pearce <spearce@spearce.org> | 2017-02-20 10:51:27 -0800 |
commit | 07fdc50c0727674ac0c7f27394b81654f73abc2f (patch) | |
tree | 7064e37977aed3fdaee3a29ff1cf8be2ba577bd3 /org.eclipse.jgit.http.test/tst | |
parent | ff6e6c2214dc4b68e6754c3d1a8fc964ad6eab41 (diff) | |
download | jgit-07fdc50c0727674ac0c7f27394b81654f73abc2f.tar.gz jgit-07fdc50c0727674ac0c7f27394b81654f73abc2f.zip |
Fix bad test fix from 0bff481 "Limit receive commands"
In 0bff481d45db74db81a3b1b86f7401443a60d970 to accurately use the two
limits it was necessary to move the LimitedInputStream out of the
PacketLineIn and further down to the PackParser. Unfortuantely this
didn't survive review, as a buggy test failed and the "fix" was to
drop this part of the code.
The maxPackSizeLimit should apply to the pack stream, not the pkt-line
framing used to send commands to control the ReceivePack instance. The
commands are controlled using a different limit. The failing test allowed
too many bytes in the pack and was only failing because it was including
the command framing. The correct fix for the test was simply to drop the
limit lower, to more closely match the actual pack size.
Change-Id: I47d3885b9d7d527e153df7ac9c62fc2865ceecf4
Diffstat (limited to 'org.eclipse.jgit.http.test/tst')
-rw-r--r-- | org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java index 1c953084db..de7891c445 100644 --- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java +++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/GitServletResponseTests.java @@ -269,7 +269,7 @@ public class GitServletResponseTests extends HttpTestCase { Transport t; // this maxPackSize leads to an unPackError - maxPackSize = 400; + maxPackSize = 100; // this PostReceiveHook when called after an unsuccesfull unpack will // lead to an IllegalStateException postHook = new PostReceiveHook() { |