Browse Source

DumbClientDumbServerTest: Open TestRepository in try-with-resource

Change-Id: Iaf339ae739689d4528a079776d6e945ba9006368
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
stable-5.4
David Pursehouse 6 years ago
parent
commit
4635f38c09
  1. 5
      org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java

5
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DumbClientDumbServerTest.java

@ -213,7 +213,10 @@ public class DumbClientDumbServerTest extends HttpTestCase {
@Test @Test
public void testInitialClone_Packed() throws Exception { public void testInitialClone_Packed() throws Exception {
new TestRepository<>(remoteRepository).packAndPrune(); try (TestRepository<Repository> tr = new TestRepository<>(
remoteRepository)) {
tr.packAndPrune();
}
Repository dst = createBareRepository(); Repository dst = createBareRepository();
assertFalse(dst.getObjectDatabase().has(A_txt)); assertFalse(dst.getObjectDatabase().has(A_txt));

Loading…
Cancel
Save