This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.4.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.4.x by this push:
     new 88554a512f Update CI contexts for karaf-4.4.x (#2537)
88554a512f is described below

commit 88554a512fcd721b013f62b419d64d426c13bedd
Author: JB Onofré <[email protected]>
AuthorDate: Wed Apr 15 15:56:55 2026 +0200

    Update CI contexts for karaf-4.4.x (#2537)
    
    * Update CI contexts for karaf-4.4.x
    
    * Fix Windows CI failure: use LF line endings in EventPrinter
    
    * Skip integration tests on Windows CI
    
    The Pax Exam Karaf container hangs during startup on Windows,
    causing the test job to time out after 1 hour.
    
    * Fix flaky MainLockingTest on macOS CI by polling for start level
    
    Replace hardcoded Thread.sleep(5000) with a poll loop waiting up to 20s
    for the start level to reach 1. The fixed sleep was too short on macOS CI
    where stopping bundles after the lock threshold is exceeded can take longer
    than the sleep allows.
---
 .asf.yaml                                          | 16 +++++++++----
 .github/workflows/ci-test-results.yml              |  6 +++--
 .github/workflows/ci.yml                           | 28 +++++++++++++++-------
 .../apache/karaf/event/command/EventPrinter.java   |  6 ++---
 .../org/apache/karaf/main/MainLockingTest.java     |  8 ++++---
 5 files changed, 43 insertions(+), 21 deletions(-)

diff --git a/.asf.yaml b/.asf.yaml
index 8c814d2eac..33013a8d0d 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -41,8 +41,12 @@ github:
       required_status_checks:
         strict: false
         contexts:
-          - build
-          - test
+          - "build (ubuntu-24.04)"
+          - "build (windows-latest)"
+          - "build (macos-latest)"
+          - "test (ubuntu-24.04)"
+          - "test (windows-latest)"
+          - "test (macos-latest)"
     karaf-4.4.x:
       required_pull_request_reviews:
         require_code_owner_reviews: false
@@ -51,8 +55,12 @@ github:
       required_status_checks:
         strict: false
         contexts:
-          - build
-          - test
+          - "build (ubuntu-24.04)"
+          - "build (windows-latest)"
+          - "build (macos-latest)"
+          - "test (ubuntu-24.04)"
+          - "test (windows-latest)"
+          - "test (macos-latest)"
 
   features:
     wiki: false
diff --git a/.github/workflows/ci-test-results.yml 
b/.github/workflows/ci-test-results.yml
index f78fd3895b..c9f71b72e9 100644
--- a/.github/workflows/ci-test-results.yml
+++ b/.github/workflows/ci-test-results.yml
@@ -42,14 +42,16 @@ jobs:
         uses: dawidd6/action-download-artifact@v20
         with:
           run_id: ${{ github.event.workflow_run.id }}
-          name: test-results
+          name: test-results-.*
+          name_is_regexp: true
           path: artifacts
 
       - name: Download Event File
         uses: dawidd6/action-download-artifact@v20
         with:
           run_id: ${{ github.event.workflow_run.id }}
-          name: event-file
+          name: event-file-.*
+          name_is_regexp: true
           path: event
 
       - name: Publish Test Results
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 255825cea8..2544e60bd5 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -27,12 +27,17 @@ on:
 
 jobs:
   build:
-    name: build
+    name: build (${{ matrix.os }})
 
     permissions:
       contents: read
 
-    runs-on: ubuntu-24.04
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ ubuntu-24.04, windows-latest, macos-latest ]
+
+    runs-on: ${{ matrix.os }}
 
     steps:
       - name: Checkout
@@ -48,18 +53,23 @@ jobs:
       - name: Save Maven Local Repository
         uses: actions/upload-artifact@v7
         with:
-          name: maven-local-repo
+          name: maven-local-repo-${{ matrix.os }}
           path: ~/.m2/repository
           retention-days: 1
 
   test:
-    name: test
+    name: test (${{ matrix.os }})
     needs: build
 
     permissions:
       contents: read
 
-    runs-on: ubuntu-24.04
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ ubuntu-24.04, windows-latest, macos-latest ]
+
+    runs-on: ${{ matrix.os }}
 
     steps:
       - name: Checkout
@@ -73,20 +83,20 @@ jobs:
       - name: Restore Maven Local Repository
         uses: actions/download-artifact@v8
         with:
-          name: maven-local-repo
+          name: maven-local-repo-${{ matrix.os }}
           path: ~/.m2/repository
       - name: Test
-        run: mvn -B -e install -Ptest
+        run: mvn -B -e install -Ptest ${{ runner.os == 'Windows' && '-pl 
!itests/test' || '' }}
         timeout-minutes: 180
       - name: Upload Test Results
         if: always()
         uses: actions/upload-artifact@v7
         with:
-          name: test-results
+          name: test-results-${{ matrix.os }}
           path: '**/target/surefire-reports/*.xml'
       - name: Upload Event File
         if: always()
         uses: actions/upload-artifact@v7
         with:
-          name: event-file
+          name: event-file-${{ matrix.os }}
           path: ${{ github.event_path }}
diff --git 
a/event/src/main/java/org/apache/karaf/event/command/EventPrinter.java 
b/event/src/main/java/org/apache/karaf/event/command/EventPrinter.java
index 9736e405bf..42a92a9ece 100644
--- a/event/src/main/java/org/apache/karaf/event/command/EventPrinter.java
+++ b/event/src/main/java/org/apache/karaf/event/command/EventPrinter.java
@@ -37,14 +37,14 @@ public class EventPrinter implements Consumer<Event>{
 
     @Override
     public void accept(Event event) {
-        out.println(getTimeStamp(event) + " - " + event.getTopic());
+        out.print(getTimeStamp(event) + " - " + event.getTopic() + "\n");
         if (verbose) {
             for (String key : event.getPropertyNames()) {
                 if (!key.equals("event.topics") && !key.equals("timestamp")) {
-                    out.println(key + ": " + getPrintValue(event, key));
+                    out.print(key + ": " + getPrintValue(event, key) + "\n");
                 }
             }
-            out.println();
+            out.print("\n");
             out.flush();
         }
     }
diff --git a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java 
b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java
index edcad4607d..aa173c920c 100644
--- a/main/src/test/java/org/apache/karaf/main/MainLockingTest.java
+++ b/main/src/test/java/org/apache/karaf/main/MainLockingTest.java
@@ -190,9 +190,11 @@ public class MainLockingTest {
         lock.setIsAlive(false);
         lock.setLock(false);
 
-        // lets wait until the start level change is complete - thrice
-        // (lostThreshold)
-        Thread.sleep(5000);
+        // wait until the start level change is complete after exceeding 
lostThreshold
+        long deadline = System.currentTimeMillis() + 20000;
+        while (sl.getStartLevel() != 1 && System.currentTimeMillis() < 
deadline) {
+            Thread.sleep(200);
+        }
         Assert.assertEquals(1, sl.getStartLevel());
 
         Thread.sleep(1000);

Reply via email to