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

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


The following commit(s) were added to refs/heads/master by this push:
     new f010a0a14 test(clients): cover a single producer connection inventory 
(#5175)
f010a0a14 is described below

commit f010a0a1463079cae94d690db511c1b6d4db76dc
Author: Loyal-Young <[email protected]>
AuthorDate: Fri Nov 27 11:54:06 2026 +0800

    test(clients): cover a single producer connection inventory (#5175)
---
 web/src/utils/clientConnectionDiagnostics.test.ts | 24 +++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/web/src/utils/clientConnectionDiagnostics.test.ts 
b/web/src/utils/clientConnectionDiagnostics.test.ts
index 698f34046..7b7359c03 100644
--- a/web/src/utils/clientConnectionDiagnostics.test.ts
+++ b/web/src/utils/clientConnectionDiagnostics.test.ts
@@ -114,6 +114,30 @@ describe('client connection diagnostics', () => {
     ]);
   });
 
+  it('keeps a single producer connection as a healthy, nonempty inventory', () 
=> {
+    const diagnostics = analyzeClientConnections([
+      connection({ clientId: 'producer-one', address: '10.0.1.10:49152' }),
+    ]);
+
+    expect(diagnostics.status).toBe('healthy');
+    expect(diagnostics.summary).toMatchObject({
+      totalConnections: 1,
+      uniqueClientCount: 1,
+      uniqueAddressCount: 1,
+      resourceCount: 1,
+      singleConsumerGroupCount: 0,
+    });
+    expect(diagnostics.resources).toEqual([
+      expect.objectContaining({
+        type: 'Producer',
+        resource: 'order-events',
+        connectionCount: 1,
+        status: 'healthy',
+      }),
+    ]);
+    expect(diagnostics.issues).toEqual([]);
+  });
+
   it('reports an empty client inventory as critical', () => {
     const diagnostics = analyzeClientConnections([]);
 

Reply via email to