sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amis...@apache.org
Subject [sentry] branch master updated: SENTRY-2505: Fix TestRollingFileWithoutDeleteAppender test case testFileNamePattern (Arjun Mishra reviewed by Haley Reeve)
Date Mon, 04 Mar 2019 18:11:27 GMT
This is an automated email from the ASF dual-hosted git repository.

amishra pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sentry.git


The following commit(s) were added to refs/heads/master by this push:
     new 6aaacd9  SENTRY-2505: Fix TestRollingFileWithoutDeleteAppender test case testFileNamePattern
(Arjun Mishra reviewed by Haley Reeve)
6aaacd9 is described below

commit 6aaacd957df1c005e00064cc2e8c5c7d3fff99bc
Author: amishra <amishra@cloudera.com>
AuthorDate: Mon Mar 4 12:10:34 2019 -0600

    SENTRY-2505: Fix TestRollingFileWithoutDeleteAppender test case testFileNamePattern (Arjun
Mishra reviewed by Haley Reeve)
---
 .../db/log/appender/TestRollingFileWithoutDeleteAppender.java  | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/log/appender/TestRollingFileWithoutDeleteAppender.java
b/sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/log/appender/TestRollingFileWithoutDeleteAppender.java
index 6ee6b08..24f507b 100644
--- a/sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/log/appender/TestRollingFileWithoutDeleteAppender.java
+++ b/sentry-service/sentry-service-server/src/test/java/org/apache/sentry/provider/db/log/appender/TestRollingFileWithoutDeleteAppender.java
@@ -86,13 +86,15 @@ public class TestRollingFileWithoutDeleteAppender {
         new PatternLayout("%m%n"), dataDir.getPath() + "/auditLog.log");
     appender.setMaximumFileSize(10);
     sentryLogger.addAppender(appender);
-    sentryLogger.debug("1234567890");
-    sentryLogger.debug("1234567890");
-    sentryLogger.debug("12345678");
+    sentryLogger.debug("1111111111");
+    Thread.sleep(500);
+    sentryLogger.debug("2222222222");
+    Thread.sleep(500);
+    sentryLogger.debug("33333333");
     File[] files = dataDir.listFiles();
     assertNotNull(files);
     assertEquals(3, files.length);
-    for (int i = 0; i < 3; i++) {
+    for (int i = 0; i < files.length; i++) {
       assertTrue(files[i].getName().matches("auditLog\\.log\\.\\d+"));
     }
   }


Mime
View raw message