@Override public void shutdown() throws Throwable { fileSystemAbstraction.close(); } }
@Override public void close() throws IOException { fileSystemAbstraction.close(); } }
@Override public void close() throws IOException { fileSystemAbstraction.close(); }
private void closeFileSystem() { try { fileSystem.close(); } catch ( IOException e ) { throw new UncheckedIOException( e ); } }
@Override public void close() throws IOException { fs.close(); }
@Override public void close() throws IOException { delegate.close(); } }
@Override public void close() throws IOException { fs.close(); }
@After public void tearDown() throws Exception { fileSystem.close(); }
@AfterEach void tearDown() throws Exception { fsa.close(); }
@After public void tearDown() throws Exception { fs.close(); }
@Override public void close() throws IOException { adversary.injectFailure( IOException.class, SecurityException.class ); delegate.close(); } }
@After public void tearDown() throws IOException { fileSystem.close(); }
@Override protected void after() { try { fs.close(); } catch ( IOException e ) { throw new UncheckedIOException( e ); } super.after(); }
@Test public void closeFileSystemOnClose() throws Exception { RealOutsideWorld outsideWorld = new RealOutsideWorld(); FileSystemAbstraction fileSystemMock = mock( FileSystemAbstraction.class ); outsideWorld.fileSystemAbstraction = fileSystemMock; outsideWorld.close(); verify( fileSystemMock ).close(); }
@Override public void close() throws Exception { pageCache.close(); scheduler.close(); fileSystem.close(); } }
@After public void after() throws Exception { if ( db != null ) { db.shutdown(); } fs.close(); }
@Override public void afterEach( ExtensionContext context ) throws Exception { getStoredValue( context ).close(); removeStoredValue( context ); }
@After public void after() throws IOException { if ( db != null ) { db.shutdown(); } fs.close(); }
@AfterEach public void tearDown() throws Exception { Thread.interrupted(); // Clear stray interrupts if ( pageCache != null ) { tearDownPageCache( pageCache ); } jobScheduler.close(); fs.close(); }
@Test public void closeFilesystemOnExit() throws IOException { RealOutsideWorld outsideWorld = new RealOutsideWorld(); FileSystemAbstraction fileSystemMock = mock( FileSystemAbstraction.class ); outsideWorld.fileSystemAbstraction = fileSystemMock; systemExitRule.expectExit( 0 ); outsideWorld.exit( 0 ); verify( fileSystemMock ).close(); } }