Add 'log4j2' domain tests to the Log4j 2.x agent
[lttng-ust-java-tests.git] / lttng-ust-java-tests-common / src / main / java / org / lttng / ust / agent / integration / filter / FilterListenerOrderingITBase.java
index 4e344e05d3c891bb3b3871e7badab359ae0fad43..fd707024c9e9194f6f95b8f878f831376051df30 100644 (file)
@@ -74,6 +74,8 @@ public abstract class FilterListenerOrderingITBase {
     protected static final String EVENT_NAME_A = "EventA";
     private static final String EVENT_NAME_B = "EventB";
 
+    protected EventRuleFactory eventRuleFactory;
+
     private ILttngSession session;
     private TestFilterListener listener;
 
@@ -116,6 +118,13 @@ public abstract class FilterListenerOrderingITBase {
         session = null;
     }
 
+    protected EventRuleFactory getEventRuleFactory() {
+        if (eventRuleFactory == null) {
+            eventRuleFactory = new EventRuleFactory(getDomain());
+        }
+        return eventRuleFactory;
+    }
+
     // ------------------------------------------------------------------------
     // Test methods
     // ------------------------------------------------------------------------
@@ -126,8 +135,8 @@ public abstract class FilterListenerOrderingITBase {
      */
     private void checkOngoingConditions() {
         Set<EventRule> exptectedRules = Stream.of(
-                EventRuleFactory.createRule(EVENT_NAME_A),
-                EventRuleFactory.createRule(EVENT_NAME_B))
+                getEventRuleFactory().createRule(EVENT_NAME_A),
+                getEventRuleFactory().createRule(EVENT_NAME_B))
                 .collect(Collectors.toSet());
 
         assertEquals(2, listener.getNbNotifications());
This page took 0.023029 seconds and 4 git commands to generate.