timoninmaxim commented on code in PR #11615:
URL: https://github.com/apache/ignite/pull/11615#discussion_r1834421285


##########
modules/core/src/test/java/org/apache/ignite/logger/java/JavaLoggerTest.java:
##########
@@ -84,4 +153,5 @@ public void testLogInitialize() throws Exception {
         assert !log.fileName().contains("%");
         assert log.fileName().contains("other-app");
     }
+

Review Comment:
   useless change



##########
modules/core/src/test/java/org/apache/ignite/testframework/junits/logger/GridTestLog4jLoggerSelfTest.java:
##########
@@ -64,28 +71,90 @@ public static void afterTests() {
         assertEquals(defaultRootLevel, 
LoggerContext.getContext(false).getConfiguration().getRootLogger().getLevel());
     }
 
+    /** */
+    @Test
+    public void testFileConstructor() throws Exception {
+        File xml = GridTestUtils.resolveIgnitePath(LOG_PATH_TEST);
+
+        assert xml != null;
+        assert xml.exists();
+
+        IgniteLogger log = new GridTestLog4jLogger(xml).getLogger(getClass());
+
+        System.out.println(log.toString());
+
+        assertTrue(log.toString().contains("GridTestLog4jLogger"));
+        assertTrue(log.toString().contains(xml.getPath()));
+
+        ((IgniteLoggerEx)log).setApplicationAndNode(null, UUID.randomUUID());
+
+        checkLog(log);
+    }
+
+    /** */
+    @Test
+    public void testUrlConstructor() throws Exception {
+        File xml = GridTestUtils.resolveIgnitePath(LOG_PATH_TEST);
+
+        assert xml != null;
+        assert xml.exists();
+
+        URL url = xml.toURI().toURL();
+        IgniteLogger log = new GridTestLog4jLogger(url).getLogger(getClass());
+
+        System.out.println(log.toString());
+
+        assertTrue(log.toString().contains("GridTestLog4jLogger"));
+        assertTrue(log.toString().contains(url.getPath()));
+
+        ((IgniteLoggerEx)log).setApplicationAndNode(null, UUID.randomUUID());
+
+        checkLog(log);
+    }
+
+    /**
+     * @throws Exception If failed.
+     */
+    @Test
+    public void testPathConstructor() throws Exception {
+        IgniteLogger log = new 
GridTestLog4jLogger(LOG_PATH_TEST).getLogger(getClass());
+
+        System.out.println(log.toString());
+
+        assertTrue(log.toString().contains("GridTestLog4jLogger"));
+        assertTrue(log.toString().contains(LOG_PATH_TEST));
+
+        ((IgniteLoggerEx)log).setApplicationAndNode(null, UUID.randomUUID());
+
+        checkLog(log);
+    }
+

Review Comment:
   remove excess blank line



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to