Skip to content

Commit

Permalink
fix: stabilize unit test testUpgradePopularSpacesPortlet - EXO-66907
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamdi committed Oct 19, 2023
1 parent dac62b0 commit 592e2c4
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,19 @@ public class PopularSpacesRemovePreferencesTest extends AbstractKernelTest {
protected EntityManagerService entityManagerService;
protected Page testPage;

public PopularSpacesRemovePreferencesTest() {
setForceContainerReload(true);
}

@Before
public void setUp() {
container = PortalContainer.getInstance();
public void setUp() throws Exception {
super.setUp();
container = getContainer();
pageService = container.getComponentInstanceOfType(PageService.class);
dataStorage = container.getComponentInstanceOfType(DataStorage.class);
entityManagerService = container.getComponentInstanceOfType(EntityManagerService.class);

begin();
}

@Test
Expand Down Expand Up @@ -75,7 +81,7 @@ public void testUpgradePopularSpacesPortlet() throws Exception {
@After
public void tearDown() throws Exception {
pageService.destroyPage(testPage.getPageKey());
RequestLifeCycle.end();
end();
}

private Page createPage(String pageName, String contentId) throws Exception {
Expand Down

0 comments on commit 592e2c4

Please sign in to comment.