Browse Source

DumbClientSmartServerTest: Open TestRepository in try-with-resource

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

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

@ -215,7 +215,10 @@ public class DumbClientSmartServerTest 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