Fixed some resource leak warnings in unit tests.

Four more warnings were left unfixed because quick fixes would've broken
the tests.
This commit is contained in:
akwizgran
2013-11-22 12:56:42 +00:00
parent 4a19f821bb
commit 0325bba86c
2 changed files with 6 additions and 0 deletions

View File

@@ -34,6 +34,7 @@ public class ConnectionReaderImplTest extends BriarTestCase {
assertEquals(-1, c.read()); // Skip the second empty frame, reach EOF
assertEquals(-1, c.read()); // Still at EOF
context.assertIsSatisfied();
c.close();
}
@Test
@@ -59,6 +60,7 @@ public class ConnectionReaderImplTest extends BriarTestCase {
// Still at EOF
assertEquals(-1, c.read(buf));
context.assertIsSatisfied();
c.close();
}
@Test
@@ -80,6 +82,7 @@ public class ConnectionReaderImplTest extends BriarTestCase {
// Reach EOF
assertEquals(-1, c.read(buf, 0, buf.length));
context.assertIsSatisfied();
c.close();
}
@Test
@@ -103,5 +106,6 @@ public class ConnectionReaderImplTest extends BriarTestCase {
// Reach EOF
assertEquals(-1, c.read(buf, 0, buf.length));
context.assertIsSatisfied();
c.close();
}
}

View File

@@ -121,6 +121,8 @@ public class TransportIntegrationTest extends BriarTestCase {
}
assertEquals(recovered1.length, offset);
assertArrayEquals(frame1, recovered1);
writer.close();
reader.close();
}
@Test