Skip to content

Commit 1835f3e

Browse files
committed
Make tearDown raise IOException
1 parent 4adc8f3 commit 1835f3e

File tree

12 files changed

+19
-16
lines changed

12 files changed

+19
-16
lines changed

logicaldoc-core/src/test/java/com/logicaldoc/core/AbstractCoreTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ private void prepareStore() throws IOException {
7878
}
7979

8080
@Override
81-
public void tearDown() throws SQLException {
81+
public void tearDown() throws IOException, SQLException {
8282
super.tearDown();
8383

8484
FileUtil.delete(rootStoreOne);

logicaldoc-core/src/test/java/com/logicaldoc/core/dashlet/DashletContentTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void setUp() throws IOException, SQLException, PluginException {
6060
}
6161

6262
@Override
63-
public void tearDown() throws SQLException {
63+
public void tearDown() throws SQLException, IOException {
6464
super.tearDown();
6565
FileUtil.delete(responseFile);
6666
}

logicaldoc-core/src/test/java/com/logicaldoc/core/searchengine/StandardSearchEngineTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public void setUp() throws IOException, SQLException, PluginException {
3333

3434
@After
3535
@Override
36-
public void tearDown() throws SQLException {
36+
public void tearDown() throws SQLException, IOException {
3737
testSubject.unlock();
3838
testSubject.close();
3939
super.tearDown();

logicaldoc-core/src/test/java/com/logicaldoc/core/security/SessionManagerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public void setUp() throws IOException, SQLException, PluginException {
7272

7373
@After
7474
@Override
75-
public void tearDown() throws SQLException {
75+
public void tearDown() throws SQLException, IOException {
7676
testSubject.removeListener(this);
7777
testSubject.destroy();
7878
super.tearDown();

logicaldoc-util/src/main/java/com/logicaldoc/util/junit/AbstractTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public void setUp() throws IOException, SQLException, PluginException {
7171
}
7272

7373
@After
74-
public void tearDown() throws SQLException {
74+
public void tearDown() throws IOException, SQLException {
7575
try {
7676
destroyDatabase();
7777
File pluginsDir = new File(

logicaldoc-util/src/test/java/com/logicaldoc/util/config/LogConfiguratorTest.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,18 @@ public void testGetAppenders() {
3131
@Test
3232
public void testGetLoggers() {
3333
LogConfigurator config = new LogConfigurator();
34-
Assert.assertTrue(config.getLoggers().stream().map(l->l.getAttributeValue("name")).toList().contains("com.logicaldoc.core"));
34+
Assert.assertTrue(config.getLoggers().stream().map(l -> l.getAttributeValue("name")).toList()
35+
.contains("com.logicaldoc.core"));
3536
}
36-
37+
3738
@Test
3839
public void testRemoveLogger() {
3940
LogConfigurator config = new LogConfigurator();
40-
Assert.assertTrue(config.getLoggers().stream().map(l->l.getAttributeValue("name")).toList().contains("com.logicaldoc.core"));
41+
Assert.assertTrue(config.getLoggers().stream().map(l -> l.getAttributeValue("name")).toList()
42+
.contains("com.logicaldoc.core"));
4143
config.removeLogger("com.logicaldoc.core");
42-
Assert.assertFalse(config.getLoggers().stream().map(l->l.getAttributeValue("name")).toList().contains("com.logicaldoc.core"));
44+
Assert.assertFalse(config.getLoggers().stream().map(l -> l.getAttributeValue("name")).toList()
45+
.contains("com.logicaldoc.core"));
4346
}
4447

4548
@Test
@@ -49,7 +52,7 @@ public void testSetRootLevel() {
4952
config.setRootLevel("debug");
5053
Assert.assertEquals("debug", config.getRootLevel());
5154
}
52-
55+
5356
@Test
5457
public void testGetFile() {
5558
LogConfigurator config = new LogConfigurator();

logicaldoc-webapp/src/test/java/com/logicaldoc/web/data/AbstractDataServletTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public void setUp() throws IOException, SQLException, PluginException {
2828

2929
@Override
3030
@After
31-
public void tearDown() throws SQLException {
31+
public void tearDown() throws SQLException, IOException {
3232
super.tearDown();
3333
clearResponseFile();
3434
}

logicaldoc-webapp/src/test/java/com/logicaldoc/web/service/DocumentServiceImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public void setUp() throws IOException, SQLException, PluginException {
131131
}
132132

133133
@Override
134-
public void tearDown() throws SQLException {
134+
public void tearDown() throws SQLException, IOException {
135135
searchEngine.unlock();
136136
searchEngine.close();
137137

logicaldoc-webapp/src/test/java/com/logicaldoc/web/service/SystemServiceImplTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public void setUp() throws IOException, SQLException, PluginException {
6060
}
6161

6262
@Override
63-
public void tearDown() throws SQLException {
63+
public void tearDown() throws SQLException, IOException {
6464
super.tearDown();
6565
FileUtil.delete(SystemServiceImpl.defaultWebappRootFolder);
6666
}

logicaldoc-webapp/src/test/java/com/logicaldoc/web/util/ServletUtilTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public void setUp() throws IOException, SQLException, PluginException {
4949
}
5050

5151
@Override
52-
public void tearDown() throws SQLException {
52+
public void tearDown() throws SQLException, IOException {
5353
super.tearDown();
5454
FileUtil.delete(RESPONSE_OUTPUT);
5555
FileUtil.delete(PLUGIN_RESOURCE);

0 commit comments

Comments
 (0)