Skip to content

Commit

Permalink
Removing wrong tests for module life cycle - TRUNK-4134
Browse files Browse the repository at this point in the history
  • Loading branch information
dkayiwa committed Nov 18, 2013
1 parent 794f2ca commit ba7fddf
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions api/src/test/java/org/openmrs/module/ModuleActivatorTest.java
Expand Up @@ -51,20 +51,6 @@ public void shouldNotCallStoppedOnStartup() throws Exception {
assertTrue(moduleTestData.getStoppedCallCount(MODULE3_ID) == 0);
}

@Test
public void shouldNotCallWillRefreshContextOnStartup() throws Exception {
assertTrue(moduleTestData.getWillRefreshContextCallCount(MODULE1_ID) == 0);
assertTrue(moduleTestData.getWillRefreshContextCallCount(MODULE2_ID) == 0);
assertTrue(moduleTestData.getWillRefreshContextCallCount(MODULE3_ID) == 0);
}

@Test
public void shouldNotCallContextRefreshedOnStartup() throws Exception {
assertTrue(moduleTestData.getContextRefreshedCallCount(MODULE1_ID) == 0);
assertTrue(moduleTestData.getContextRefreshedCallCount(MODULE2_ID) == 0);
assertTrue(moduleTestData.getContextRefreshedCallCount(MODULE3_ID) == 0);
}

@Test

This comment has been minimized.

Copy link
@wluyima

wluyima Nov 19, 2013

Member

I was suggesting that you change them to do the opposite, i.e check that these methods are called on startup too for started modules

This comment has been minimized.

Copy link
@dkayiwa

dkayiwa Nov 19, 2013

Author Member

I think i put what you are looking for in WebModuleActivatorTest.shouldRefreshContextForAllStartedModulesOnWebStartup()
When we simply call ModuleUtil.startup() those methods are not called which explains why the above deleted tests were passing.
It is Listener.performWebStartOfModules() that will lead to their being called.

This comment has been minimized.

Copy link
@wluyima

wluyima Nov 19, 2013

Member

ok

public void shouldStartModulesInOrder() throws Exception {
//module2 depends on module1 while module3 depends on module2
Expand Down

0 comments on commit ba7fddf

Please sign in to comment.