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

rzo1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/storm.git


The following commit(s) were added to refs/heads/master by this push:
     new 06946c36a Fix flaky Cypress test and update CI node version
06946c36a is described below

commit 06946c36a119fc8570228b9501f56878205970cf
Author: Richard Zowalla <[email protected]>
AuthorDate: Thu Apr 2 11:51:02 2026 +0200

    Fix flaky Cypress test and update CI node version
    
      Replace synchronous vis.js node count assertions with retry-able
      Cypress queries to avoid race conditions in headless CI. Update
      the Cypress workflow to use Node 24.
---
 .github/workflows/cypress-tests.yml           |  2 +-
 storm-webapp/cypress/e2e/visualize-page.cy.js | 19 ++++++++-----------
 2 files changed, 9 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/cypress-tests.yml 
b/.github/workflows/cypress-tests.yml
index 2ee35bee0..1bf9b0fee 100644
--- a/.github/workflows/cypress-tests.yml
+++ b/.github/workflows/cypress-tests.yml
@@ -38,7 +38,7 @@ jobs:
       - name: Set up Node.js
         uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # 
v4.4.0
         with:
-          node-version: 20
+          node-version: 24
           cache: npm
           cache-dependency-path: storm-webapp/package-lock.json
 
diff --git a/storm-webapp/cypress/e2e/visualize-page.cy.js 
b/storm-webapp/cypress/e2e/visualize-page.cy.js
index 6e466bf66..8703dad60 100644
--- a/storm-webapp/cypress/e2e/visualize-page.cy.js
+++ b/storm-webapp/cypress/e2e/visualize-page.cy.js
@@ -53,13 +53,11 @@ describe('Storm UI - Topology Visualization Page', () => {
   });
 
   it('creates a vis.js network from the topology data', () => {
-    cy.window().then((win) => {
-      // visNS is set by visualization.js
-      expect(win.visNS).to.exist;
-      expect(win.visNS.nodes).to.exist;
-      // Nodes should have been populated from the API response
-      expect(win.visNS.nodes.length).to.be.greaterThan(0);
-    });
+    // visNS is set by visualization.js; use retry-able assertion
+    // to wait for the network to populate
+    cy.window({ timeout: 5000 })
+      .its('visNS.nodes.length')
+      .should('be.greaterThan', 0);
   });
 });
 
@@ -84,10 +82,9 @@ describe('Storm UI - Topology Visualization (Dark Mode)', () 
=> {
   });
 
   it('renders nodes and streams in dark mode without errors', () => {
-    cy.window().then((win) => {
-      expect(win.visNS).to.exist;
-      expect(win.visNS.nodes.length).to.be.greaterThan(0);
-    });
+    cy.window({ timeout: 5000 })
+      .its('visNS.nodes.length')
+      .should('be.greaterThan', 0);
     cy.get('#available-streams li', { timeout: 5000 })
       .should('have.length.greaterThan', 0);
   });

Reply via email to