Skip to content

Commit 15ed60c

Browse files
committed
fixed some minor details in the tests
1 parent dc6c495 commit 15ed60c

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

logicaldoc-core/src/test/java/com/logicaldoc/core/document/DocumentManagerImplTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ public void testReplaceAlias() throws PersistenceException {
668668
}
669669

670670
@Test
671-
public void testCheckin() throws PersistenceException, IOException {
671+
public void testCheckin() throws PersistenceException, IOException, InterruptedException {
672672
User user = userDao.findByUsername("admin");
673673
DocumentHistory transaction = new DocumentHistory();
674674
transaction.setFolderId(103L);
@@ -706,7 +706,10 @@ public void testCheckin() throws PersistenceException, IOException {
706706
assertEquals(AbstractDocument.DOC_UNLOCKED, doc.getStatus());
707707

708708
testSubject.checkout(1L, transaction);
709-
doc = docDao.findById(1);
709+
710+
waiting();
711+
712+
doc = docDao.findById(1L);
710713
docDao.initialize(doc);
711714
assertEquals(Document.DOC_CHECKED_OUT, doc.getStatus());
712715

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -194,24 +194,15 @@ public void testGetStatistics() throws ServerException {
194194
assertEquals(5, stats.size());
195195
}
196196

197-
@Test
198-
public void testUninstallPlugin() throws ServerException {
199-
File pluginFile = new File("target/tests-plugins/logicaldoc-dummy-plugin.jar");
200-
assertTrue(pluginFile.exists());
201-
assertEquals(2, testSubject.getPlugins().size());
202-
testSubject.uninstallPlugin("logicaldoc-dummy");
203-
204-
pluginFile = new File("target/tests-plugins/logicaldoc-dummy-plugin.jar");
205-
assertFalse(pluginFile.exists());
206-
}
207-
208197
@Test
209198
public void testInitializePlugin() throws ServerException {
210199
try {
211200
assertEquals(2, testSubject.getPlugins().size());
212201
testSubject.initializePlugin("logicaldoc-dummy");
213202
} catch (ServerException e) {
214203
fail(e.getMessage());
204+
} finally {
205+
testSubject.uninstallPlugin("logicaldoc-dummy");
215206
}
216207
}
217208

0 commit comments

Comments
 (0)