Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fabrizzio-dotCMS committed Aug 15, 2024
1 parent c5e4641 commit f029682
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions dotCMS/src/test/java/com/dotcms/UnitTestBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected CompanyAPI getCompanyAPIImpl() {
}

@BeforeClass
public static void prepare () throws DotDataException, DotSecurityException, Exception {
public static void prepare () throws Exception {
weld = new Weld().containerId(RegistrySingletonProvider.STATIC_INSTANCE)
.initialize();

Expand All @@ -66,7 +66,9 @@ public static void prepare () throws DotDataException, DotSecurityException, Exc
}

@AfterClass
public static void cleanup() throws DotDataException, DotSecurityException, Exception {
weld.shutdown();
public static void cleanup() {
if( null != weld && weld.isRunning() ){
weld.shutdown();
}
}
}

0 comments on commit f029682

Please sign in to comment.