Skip to content
Snippets Groups Projects
Commit 0325bba8 authored by akwizgran's avatar akwizgran
Browse files

Fixed some resource leak warnings in unit tests.

Four more warnings were left unfixed because quick fixes would've broken
the tests.
parent 4a19f821
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
}
......@@ -121,6 +121,8 @@ public class TransportIntegrationTest extends BriarTestCase {
}
assertEquals(recovered1.length, offset);
assertArrayEquals(frame1, recovered1);
writer.close();
reader.close();
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment