This is an automated email from the ASF dual-hosted git repository.
timothyjward pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/aries-typedevent.git
The following commit(s) were added to refs/heads/main by this push:
new a778b22 Increased the OSGi test service timeout to 1s
a778b22 is described below
commit a778b227bb328417253ec5488b76a5b788af7f2f
Author: Tim Ward <[email protected]>
AuthorDate: Mon Nov 30 11:59:20 2026 +0000
Increased the OSGi test service timeout to 1s
The default 200ms wait for injected services was occasionally too short on
slow machines.
Signed-off-by: Tim Ward <[email protected]>
---
.../bus/osgi/TypedEventMonitorIntegrationTest.java | 36 +++++++++++-----------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git
a/org.apache.aries.typedevent.bus/src/test/java/org/apache/aries/typedevent/bus/osgi/TypedEventMonitorIntegrationTest.java
b/org.apache.aries.typedevent.bus/src/test/java/org/apache/aries/typedevent/bus/osgi/TypedEventMonitorIntegrationTest.java
index 3eba5bd..b1ff69c 100644
---
a/org.apache.aries.typedevent.bus/src/test/java/org/apache/aries/typedevent/bus/osgi/TypedEventMonitorIntegrationTest.java
+++
b/org.apache.aries.typedevent.bus/src/test/java/org/apache/aries/typedevent/bus/osgi/TypedEventMonitorIntegrationTest.java
@@ -98,8 +98,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
* @throws InvocationTargetException
*/
@Test
- public void testTypedEventMonitor1(@InjectService TypedEventMonitor
monitor,
- @InjectService TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
+ public void testTypedEventMonitor1(@InjectService(timeout = 1000)
TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
Promise<List<MonitorEvent>> eventsPromise = monitor.monitorEvents()
.limit(2)
@@ -146,8 +146,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
* @throws InvocationTargetException
*/
@Test
- public void testTypedEventMonitor2(@InjectService TypedEventMonitor
monitor,
- @InjectService TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
+ public void testTypedEventMonitor2(@InjectService(timeout = 1000)
TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
Promise<List<MonitorEvent>> eventsPromise = monitor.monitorEvents()
.limit(2)
@@ -183,8 +183,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
* @throws InvocationTargetException
*/
@Test
- public void testTypedEventMonitorHistory1(@InjectService TypedEventMonitor
monitor,
- @InjectService TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
+ public void testTypedEventMonitorHistory1(@InjectService(timeout = 1000)
TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
TestEvent event = new TestEvent();
event.message = "boo";
@@ -246,8 +246,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
* @throws InvocationTargetException
*/
@Test
- public void testTypedEventMonitorHistory1Close(@InjectService
TypedEventMonitor monitor,
- @InjectService TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
+ public void testTypedEventMonitorHistory1Close(@InjectService(timeout =
1000) TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
TestEvent event = new TestEvent();
event.message = "boo";
@@ -297,8 +297,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
* @throws InvocationTargetException
*/
@Test
- public void testTypedEventMonitorHistory2(@InjectService TypedEventMonitor
monitor,
- @InjectService TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
+ public void testTypedEventMonitorHistory2(@InjectService(timeout = 1000)
TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
Instant beforeFirst = Instant.now().minus(Duration.ofMillis(500));
@@ -375,8 +375,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
* @throws InvocationTargetException
*/
@Test
- public void testTypedEventMonitorHistory2Close(@InjectService
TypedEventMonitor monitor,
- @InjectService TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
+ public void testTypedEventMonitorHistory2Close(@InjectService(timeout =
1000) TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
InterruptedException, InvocationTargetException {
Instant beforeFirst = Instant.now().minus(Duration.ofMillis(500));
@@ -437,8 +437,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
@WithConfiguration(pid = "org.apache.aries.typedevent.bus", properties =
@Property(key = "event.history.enable.at.start", value = "false", scalar =
Scalar.Boolean))
@Test
- public void testTopicConfig(@InjectService TypedEventMonitor monitor,
- @InjectService TypedEventBus eventBus) throws Exception {
+ public void testTopicConfig(@InjectService(timeout = 1000)
TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
Exception {
RangePolicy historyStorage =
monitor.getEffectiveHistoryStorage(TEST_EVENT_TOPIC);
assertEquals(0, historyStorage.getMinimum());
@@ -493,8 +493,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
@WithConfiguration(pid = "org.apache.aries.typedevent.bus", properties =
@Property(key = "event.history.enable.at.start", value = "false", scalar =
Scalar.Boolean))
@Test
- public void testMinimumRetention(@InjectService TypedEventMonitor monitor,
- @InjectService TypedEventBus eventBus) throws Exception {
+ public void testMinimumRetention(@InjectService(timeout = 1000)
TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
Exception {
monitor.configureHistoryStorage(TEST_EVENT_TOPIC, RangePolicy.range(3,
5));
monitor.configureHistoryStorage("*", RangePolicy.unlimited());
@@ -601,8 +601,8 @@ public class TypedEventMonitorIntegrationTest extends
AbstractIntegrationTest {
* not prevent later events from being delivered
*/
@Test
- public void testCyclicEventMonitoring(@InjectService TypedEventMonitor
monitor,
- @InjectService TypedEventBus eventBus) throws Exception {
+ public void testCyclicEventMonitoring(@InjectService(timeout = 1000)
TypedEventMonitor monitor,
+ @InjectService(timeout = 1000) TypedEventBus eventBus) throws
Exception {
Promise<List<MonitorEvent>> eventsPromise = monitor.monitorEvents()
.limit(2)