summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@verizonmedia.com>2019-07-03 10:47:03 -0700
committerJon Bratseth <bratseth@verizonmedia.com>2019-07-03 10:47:03 -0700
commit6977ee22909e2fff5438602390a0abaddc040210 (patch)
treef17ef62559a0229a61acc0362b5a8cd2fd28a35d
parentfd65e3d63e7bbb7bacf05a760811f5d814799767 (diff)
Nonfunctional changes only
-rw-r--r--vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java23
-rw-r--r--vespa-http-client/src/test/java/com/yahoo/vespa/http/client/FeedClientTest.java1
2 files changed, 14 insertions, 10 deletions
diff --git a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
index 25b0ef20e81..c72a313a4b7 100644
--- a/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
+++ b/vespa-http-client/src/main/java/com/yahoo/vespa/http/client/core/communication/IOThread.java
@@ -84,16 +84,19 @@ class IOThread implements Runnable, AutoCloseable {
return endpoint;
}
- static class ConnectionStats {
- final int wrongSessionDetectedCounter;
- final int wrongVersionDetectedCounter;
- final int problemStatusCodeFromServerCounter;
- final int executeProblemsCounter;
- final int docsReceivedCounter;
- final int statusReceivedCounter;
- final int pendingDocumentStatusCount;
- final int successfullHandshakes;
- final int lastGatewayProcessTimeMillis;
+ public static class ConnectionStats {
+
+ // NOTE: These fields are accessed by reflection in JSON serialization
+
+ public final int wrongSessionDetectedCounter;
+ public final int wrongVersionDetectedCounter;
+ public final int problemStatusCodeFromServerCounter;
+ public final int executeProblemsCounter;
+ public final int docsReceivedCounter;
+ public final int statusReceivedCounter;
+ public final int pendingDocumentStatusCount;
+ public final int successfullHandshakes;
+ public final int lastGatewayProcessTimeMillis;
ConnectionStats(int wrongSessionDetectedCounter,
int wrongVersionDetectedCounter,
diff --git a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/FeedClientTest.java b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/FeedClientTest.java
index 88deaa07e12..9f6323d74aa 100644
--- a/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/FeedClientTest.java
+++ b/vespa-http-client/src/test/java/com/yahoo/vespa/http/client/FeedClientTest.java
@@ -55,6 +55,7 @@ public class FeedClientTest {
feedClient.stream(DOCID, "blob");
while (resultsReceived.get() == 0) {Thread.sleep(3); }
String stats = feedClient.getStatsAsJson();
+ System.out.println("Stats: "+ stats);
assertTrue(stats.contains("\"dryRun\":true"));
feedClient.close();
}