Skip to content

Commit

Permalink
Fix tests with custom CDI providers
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Sep 6, 2023
1 parent 631faf5 commit 30c0538
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ public class CustomCDIProviderTest extends WeldSETest {

@Test
public void testCustomCDIProvider() {
// Other tests running prior to this one might have set the provider already
// repeated set invocation leads to an exception, so we do a cautious unset
TestCDI.unsetCDIProvider();
try {
CustomCDIProvider.reset();
CDI.setCDIProvider(new CustomCDIProvider());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ public static WebArchive createTestArchive() {

@Test
public void testCustomCDIProvider() {
// Other tests running prior to this one might have set the provider already
// repeated set invocation leads to an exception, so we do a cautious unset
TestCDI.unsetCDIProvider();
try {
CustomCDIProvider.reset();
CDI.setCDIProvider(new CustomCDIProvider());
Expand Down

0 comments on commit 30c0538

Please sign in to comment.