Fix "expected keys" stats bug (b/13886888)
diff --git a/src/com/google/enterprise/adaptor/DownloadDumpHandler.java b/src/com/google/enterprise/adaptor/DownloadDumpHandler.java index 58776d8..5836310 100644 --- a/src/com/google/enterprise/adaptor/DownloadDumpHandler.java +++ b/src/com/google/enterprise/adaptor/DownloadDumpHandler.java
@@ -245,8 +245,8 @@ Map<String, Object> sMap = (Map<String, Object>) map.get("simpleStats"); Set<String> expectedDateAttrs = ImmutableSet.of("whenStarted", "lastSuccessfulFullPushStart", "lastSuccessfulFullPushEnd", - "currentFullPushStart", "lastSuccessfulIncremementalPushStart", - "lastSuccessfulIncremementalPushEnd", "currentIncrementalPushEnd"); + "currentFullPushStart", "lastSuccessfulIncrementalPushStart", + "lastSuccessfulIncrementalPushEnd"); DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss Z"); dateFormat.setTimeZone(TimeZone.getTimeZone("GMT")); for (String key : expectedDateAttrs) {
diff --git a/test/com/google/enterprise/adaptor/DownloadDumpHandlerTest.java b/test/com/google/enterprise/adaptor/DownloadDumpHandlerTest.java index af54f48..bb9947f 100644 --- a/test/com/google/enterprise/adaptor/DownloadDumpHandlerTest.java +++ b/test/com/google/enterprise/adaptor/DownloadDumpHandlerTest.java
@@ -227,8 +227,7 @@ simpleStats.put("whenStarted", "non-numeric value"); simpleStats.put("lastSuccessfulFullPushEnd", null); simpleStats.put("currentFullPushStart", 0); - simpleStats.put("lastSuccessfulIncremementalPushStart", -5); - simpleStats.put("currentIncrementalPushEnd", 1389735897000L); + simpleStats.put("lastSuccessfulIncrementalPushStart", -5); // rest omitted results.put("simpleStats", simpleStats); @@ -248,11 +247,10 @@ assertEquals(3, entries); /* 0 log files + thread dump + config + stats */ // verify contents of stats file - String goldenStats = "currentFullPushStart = 0\n" - + "currentIncrementalPushEnd = 01/14/2014 21:44:57 +0000\n" - + "lastSuccessfulFullPushEnd = [null]\n" - + "lastSuccessfulIncremementalPushStart = -5\n" - + "whenStarted = non-numeric value\n\n"; + String goldenStats = "currentFullPushStart = 0\n" + + "lastSuccessfulFullPushEnd = [null]\n" + + "lastSuccessfulIncrementalPushStart = -5\n" + + "whenStarted = non-numeric value\n\n"; String statsContents = extractFileFromZip("stats.txt", zipContents); assertEquals(goldenStats, statsContents); }