UploadPackTest#testUploadRedundantBytes: ensure test repo is closed
This fixes a resource leak warning. Change-Id: I65166eeefc719ea577963c84ce2059e2d7e6c1d7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
7fbc0e02a0
commit
dcc6c8a261
|
@ -1117,13 +1117,16 @@ public void testUploadRedundantBytes() throws Exception {
|
||||||
RevCommit child = remote.commit(remote.tree(remote.file("foo", childBlob)), parent);
|
RevCommit child = remote.commit(remote.tree(remote.file("foo", childBlob)), parent);
|
||||||
remote.update("branch1", child);
|
remote.update("branch1", child);
|
||||||
|
|
||||||
TestRepository<InMemoryRepository> local = new TestRepository<>(client);
|
try (TestRepository<InMemoryRepository> local = new TestRepository<>(
|
||||||
RevBlob localParentBlob = local.blob(commonInBlob + "a");
|
client)) {
|
||||||
RevCommit localParent = local.commit(local.tree(local.file("foo", localParentBlob)));
|
RevBlob localParentBlob = local.blob(commonInBlob + "a");
|
||||||
RevBlob localChildBlob = local.blob(commonInBlob + "b");
|
RevCommit localParent = local
|
||||||
RevCommit localChild = local.commit(
|
.commit(local.tree(local.file("foo", localParentBlob)));
|
||||||
local.tree(local.file("foo", localChildBlob)), localParent);
|
RevBlob localChildBlob = local.blob(commonInBlob + "b");
|
||||||
local.update("branch1", localChild);
|
RevCommit localChild = local.commit(
|
||||||
|
local.tree(local.file("foo", localChildBlob)), localParent);
|
||||||
|
local.update("branch1", localChild);
|
||||||
|
}
|
||||||
|
|
||||||
ByteArrayInputStream recvStream = uploadPackV2(
|
ByteArrayInputStream recvStream = uploadPackV2(
|
||||||
"command=fetch\n",
|
"command=fetch\n",
|
||||||
|
|
Loading…
Reference in New Issue