You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by sa...@apache.org on 2018/08/03 15:38:44 UTC
[geode] branch develop updated: GEODE-5212: reduce flakiness of
ExportLogsOverHttpDistributedTest (#2253)
This is an automated email from the ASF dual-hosted git repository.
sai_boorlagadda pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/develop by this push:
new e6c383f GEODE-5212: reduce flakiness of ExportLogsOverHttpDistributedTest (#2253)
e6c383f is described below
commit e6c383fc482ceec72ad4cb9920e305aeb04fd82e
Author: Sai Boorlagadda <sa...@gmail.com>
AuthorDate: Fri Aug 3 08:38:38 2018 -0700
GEODE-5212: reduce flakiness of ExportLogsOverHttpDistributedTest (#2253)
---
.../management/internal/cli/commands/ExportLogsDUnitTest.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ExportLogsDUnitTest.java b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ExportLogsDUnitTest.java
index c6ffb97..6d81d27 100644
--- a/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ExportLogsDUnitTest.java
+++ b/geode-core/src/distributedTest/java/org/apache/geode/management/internal/cli/commands/ExportLogsDUnitTest.java
@@ -39,10 +39,12 @@ import java.util.Map;
import java.util.Objects;
import java.util.Properties;
import java.util.Set;
+import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.Logger;
+import org.awaitility.Awaitility;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -183,6 +185,11 @@ public class ExportLogsDUnitTest {
public void testExportWithStartAndEndDateTimeFiltering() throws Exception {
ZonedDateTime cutoffTime = LocalDateTime.now().atZone(ZoneId.systemDefault());
+ // wait for atleast 1 second to reduce flakiness on windows
+ // on windows the flakiness is caused due to the cutoffTime
+ // being same as the log message logged on server1.
+ Awaitility.await().atLeast(1, TimeUnit.MILLISECONDS).until(() -> true);
+
String messageAfterCutoffTime =
"[this message should not show up since it is after cutoffTime]";
LogLine logLineAfterCutoffTime = new LogLine(messageAfterCutoffTime, "info", true);