File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
scr/src/test/java/org/apache/felix/scr/integration Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -142,8 +142,6 @@ public abstract class ComponentTestBase
142142
143143 protected static final String PROP_NAME_FACTORY = ComponentTestBase .PROP_NAME + ".factory" ;
144144
145- protected static long DS_SERVICE_CHANGECOUNT_TIMEOUT = ScrConfiguration .DEFAULT_SERVICE_CHANGECOUNT_TIMEOUT_MILLISECONDS ;
146-
147145 static
148146 {
149147 theConfig = new Hashtable <>();
@@ -202,8 +200,7 @@ public static Option[] configuration()
202200 systemProperty ( "ds.loglevel" ).value ( DS_LOGLEVEL ),
203201 systemProperty ( "ds.cache.metadata" ).value ( Boolean .toString (CACHE_META_DATA ) ),
204202 systemProperty ( "logback.configurationFile" ).value ( "src/test/resources/logback-test.xml" ),
205- systemProperty ( EXAM_FAIL_ON_UNRESOLVED_KEY ).value ( "true" ),
206- systemProperty ( "ds.service.changecount.timeout" ).value ( Long .toString (DS_SERVICE_CHANGECOUNT_TIMEOUT ) )
203+ systemProperty ( EXAM_FAIL_ON_UNRESOLVED_KEY ).value ( "true" )
207204
208205 );
209206 final Option vmOption = ( paxRunnerVmOption != null )? CoreOptions .vmOption ( paxRunnerVmOption ): null ;
Original file line number Diff line number Diff line change 2222import org .junit .Before ;
2323import org .junit .Test ;
2424import org .junit .runner .RunWith ;
25+ import org .ops4j .pax .exam .Configuration ;
26+ import org .ops4j .pax .exam .Option ;
27+ import org .ops4j .pax .exam .OptionUtils ;
2528import org .ops4j .pax .exam .junit .PaxExam ;
2629import org .osgi .framework .BundleException ;
2730import org .osgi .framework .Constants ;
3538
3639import static org .junit .Assert .assertEquals ;
3740import static org .junit .Assert .assertSame ;
41+ import static org .ops4j .pax .exam .CoreOptions .systemProperty ;
3842
3943@ RunWith (PaxExam .class )
4044public class Felix6778Test extends ComponentTestBase implements ServiceListener
4145{
4246
47+ private static final long DS_SERVICE_CHANGECOUNT_TIMEOUT = 1000 ;
48+
4349 static
4450 {
4551 descriptorFile = "/integration_test_simple_components.xml" ;
46- DS_SERVICE_CHANGECOUNT_TIMEOUT = 1000 ;
4752 }
4853
4954 class RecordedScrChangeCount
@@ -58,6 +63,13 @@ class RecordedScrChangeCount
5863 }
5964 }
6065
66+ @ Configuration
67+ public static Option [] configuration ()
68+ {
69+ return OptionUtils .combine (ComponentTestBase .configuration (),
70+ systemProperty ( "ds.service.changecount.timeout" ).value ( Long .toString (DS_SERVICE_CHANGECOUNT_TIMEOUT ) ));
71+ }
72+
6173 private List <RecordedScrChangeCount > recordedEvents = new CopyOnWriteArrayList <>();
6274
6375 @ Before
You can’t perform that action at this time.
0 commit comments