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

lizhimins pushed a commit to branch rocketmq-studio
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git


The following commit(s) were added to refs/heads/rocketmq-studio by this push:
     new 766ce9c9d fix(test): repair two test-source breaks that neither suite 
gated (#6735)
766ce9c9d is described below

commit 766ce9c9d7dcc248d2115e23b955bcc90b64cfe1
Author: lizhimins <[email protected]>
AuthorDate: Thu Oct 15 20:04:54 2026 +0800

    fix(test): repair two test-source breaks that neither suite gated (#6735)
    
    Two independent merges left the branch unable to compile its tests:
    
    - #6494 added expectedAttemptCount to claimForDispatch, and #6663 then added
      two stubs written against the old five-argument signature. Neither changed
      the same lines, so both merged cleanly and mvn test-compile failed for the
      whole module. Match the six-argument form already used at lines 
177/245/276.
    - The audit top-operator regression passed operator: null, which AuditRecord
      types as string. vitest strips types without checking them, so the suite 
was
      green while tsc -b failed and npm run build could not produce a bundle.
      operator: undefined exercises the same normalizeText/?.trim() path.
    
    Verified: mvn test on the server module, npm run build (tsc -b + vite build 
+
    license check), and the full vitest suite. Reverting the buildTopOperator
    identity key still turns only the new audit test red.
---
 .../rocketmq/studio/ops/alert/NotificationOutboxServiceTest.java      | 4 ++--
 web/src/pages/ops/__tests__/auditRiskInsights.test.ts                 | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/server/src/test/java/org/apache/rocketmq/studio/ops/alert/NotificationOutboxServiceTest.java
 
b/server/src/test/java/org/apache/rocketmq/studio/ops/alert/NotificationOutboxServiceTest.java
index 37fa0bcf8..828c9f135 100644
--- 
a/server/src/test/java/org/apache/rocketmq/studio/ops/alert/NotificationOutboxServiceTest.java
+++ 
b/server/src/test/java/org/apache/rocketmq/studio/ops/alert/NotificationOutboxServiceTest.java
@@ -482,7 +482,7 @@ class NotificationOutboxServiceTest {
         when(mapper.findDispatchable(any(LocalDateTime.class), 
any(LocalDateTime.class), any(Integer.class)))
                 .thenReturn(List.of(row));
         when(mapper.claimForDispatch(any(), any(LocalDateTime.class), 
any(LocalDateTime.class),
-                any(LocalDateTime.class), anyString())).thenReturn(1);
+                any(LocalDateTime.class), anyString(), 
anyInt())).thenReturn(1);
         when(mapper.update(any(), any())).thenReturn(1);
         
when(alerts.findAlertById(9L)).thenReturn(Optional.of(SystemAlertVO.builder().id(9L)
                 
.level(AlertLevel.warning).title("Lag").description("high").instanceId("local").build()));
@@ -514,7 +514,7 @@ class NotificationOutboxServiceTest {
         when(mapper.findDispatchable(any(LocalDateTime.class), 
any(LocalDateTime.class), any(Integer.class)))
                 .thenReturn(List.of(row));
         when(mapper.claimForDispatch(any(), any(LocalDateTime.class), 
any(LocalDateTime.class),
-                any(LocalDateTime.class), anyString())).thenReturn(1);
+                any(LocalDateTime.class), anyString(), 
anyInt())).thenReturn(1);
         when(mapper.update(any(), any())).thenReturn(1);
         
when(alerts.findAlertById(9L)).thenReturn(Optional.of(SystemAlertVO.builder().id(9L)
                 
.level(AlertLevel.warning).title("Lag").description("high").instanceId("local").build()));
diff --git a/web/src/pages/ops/__tests__/auditRiskInsights.test.ts 
b/web/src/pages/ops/__tests__/auditRiskInsights.test.ts
index 5bcb23c8e..2b8d3a272 100644
--- a/web/src/pages/ops/__tests__/auditRiskInsights.test.ts
+++ b/web/src/pages/ops/__tests__/auditRiskInsights.test.ts
@@ -190,9 +190,9 @@ describe('audit risk insights', () => {
 
   it('keeps a missing operator distinct from one literally named system Test', 
() => {
     const insights = buildAuditRiskInsights(null, [
-      record({ id: 1, operator: null, target: 'orders' }),
+      record({ id: 1, operator: undefined, target: 'orders' }),
       record({ id: 2, operator: '  ', target: 'payments' }),
-      record({ id: 3, operator: null, target: 'refunds' }),
+      record({ id: 3, operator: undefined, target: 'refunds' }),
       record({ id: 4, operator: 'system', target: 'invoices' }),
       record({ id: 5, operator: 'system', target: 'shipments' }),
       record({ id: 6, operator: 'ops-a', target: 'ledger' }),

Reply via email to