-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17544 from mkouba/arc-reqcontext-lifecycle-events
ArC - do not activate request context for Inialized/Destroyed events
- Loading branch information
Showing
5 changed files
with
65 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
independent-projects/arc/runtime/src/test/java/io/quarkus/arc/impl/QualifiersTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package io.quarkus.arc.impl; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
import java.lang.annotation.Annotation; | ||
import java.util.Collections; | ||
import java.util.Set; | ||
import javax.enterprise.context.Initialized; | ||
import javax.enterprise.inject.Any; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class QualifiersTest { | ||
|
||
@Test | ||
public void testIsSubset() { | ||
Set<Annotation> observed = Set.of(Initialized.Literal.REQUEST, Any.Literal.INSTANCE); | ||
Set<Annotation> event = Set.of(Initialized.Literal.APPLICATION, Any.Literal.INSTANCE); | ||
assertFalse(Qualifiers.isSubset(observed, event, Collections.emptyMap())); | ||
|
||
observed = Set.of(Initialized.Literal.APPLICATION, Any.Literal.INSTANCE); | ||
assertTrue(Qualifiers.isSubset(observed, event, Collections.emptyMap())); | ||
|
||
observed = Set.of(Any.Literal.INSTANCE); | ||
assertTrue(Qualifiers.isSubset(observed, event, Collections.emptyMap())); | ||
|
||
observed = Set.of(Initialized.Literal.APPLICATION); | ||
assertTrue(Qualifiers.isSubset(observed, event, Collections.emptyMap())); | ||
} | ||
|
||
} |
33 changes: 0 additions & 33 deletions
33
...projects/arc/runtime/src/test/resources/META-INF/services/org.jboss.weld.arc.BeanProvider
This file was deleted.
Oops, something went wrong.