arjunashok commented on code in PR #166:
URL: https://github.com/apache/cassandra-sidecar/pull/166#discussion_r1927588503


##########
client/src/testFixtures/java/org/apache/cassandra/sidecar/client/SidecarClientTest.java:
##########
@@ -1573,6 +1575,36 @@ public void onError(Throwable throwable)
         assertThat(new String(baos.toByteArray(), 
StandardCharsets.UTF_8)).isEqualTo("Test Content");
     }
 
+    @Test
+    public void testStreamsStats() throws Exception
+    {
+        String streamStatsResponseAsString = "{\"operationMode\":\"NORMAL\"," +
+                                             
"\"streamProgressStats\":{\"totalFilesToReceive\":7," +
+                                             
"\"totalFilesReceived\":7,\"totalBytesToReceive\":15088," +
+                                             
"\"totalBytesReceived\":15088,\"totalFilesToSend\":0,\"totalFilesSent\":0," +
+                                             
"\"totalBytesToSend\":0,\"totalBytesSent\":0}}";
+
+        MockResponse response = new 
MockResponse().setResponseCode(OK.code()).setBody(streamStatsResponseAsString);
+        enqueue(response);
+        StreamStatsResponse result = client.streamsStats().get();
+
+        assertThat(result).isNotNull();
+        assertThat(result.operationMode()).isNotNull().isEqualTo("NORMAL");
+        StreamProgressStats progressStats = result.streamProgressStats();
+        assertThat(progressStats).isNotNull();
+        assertThat(progressStats.totalBytesReceived()).isNotNull();

Review Comment:
   Added



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to