mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user