Merged transports' finish() and dispose() methods.

This commit is contained in:
akwizgran
2011-10-06 19:00:33 +01:00
parent 07d6715881
commit c08f6c4d1e
10 changed files with 29 additions and 65 deletions

View File

@@ -289,10 +289,9 @@ public class RemovableDrivePluginTest extends TestCase {
out.write(new byte[123]);
out.flush();
out.close();
writer.finish();
assertEquals(123L, files[0].length());
// Disposing of the writer should delete the file
writer.dispose();
writer.dispose(true);
files = drive1.listFiles();
assertTrue(files == null || files.length == 0);

View File

@@ -107,7 +107,7 @@ public class SimpleSocketPluginTest extends TestCase {
assertTrue(latch.await(1, TimeUnit.SECONDS));
assertFalse(error.get());
// Clean up
conn.getInputStream().close(); // FIXME: Change the API
conn.dispose(true);
ss.close();
plugin.stop();
}