jackwener commented on code in PR #12818: URL: https://github.com/apache/doris/pull/12818#discussion_r978341424
########## fe/fe-core/src/test/java/org/apache/doris/catalog/ColumnStatsTest.java: ########## @@ -59,29 +57,29 @@ public void testSerialization() throws Exception { dos.close(); // 2. Read objects from file - DataInputStream dis = new DataInputStream(new FileInputStream(file)); + DataInputStream dis = new DataInputStream(Files.newInputStream(path)); ColumnStats rStats1 = new ColumnStats(); rStats1.readFields(dis); - Assert.assertTrue(rStats1.equals(stats1)); + Assert.assertEquals(rStats1, stats1); ColumnStats rStats2 = new ColumnStats(); rStats2.readFields(dis); - Assert.assertTrue(rStats2.equals(stats2)); + Assert.assertEquals(rStats2, stats2); ColumnStats rStats3 = ColumnStats.read(dis); - Assert.assertTrue(rStats3.equals(stats3)); + Assert.assertEquals(rStats3, stats3); ColumnStats rStats4 = ColumnStats.read(dis); - Assert.assertTrue(rStats4.equals(stats4)); - Assert.assertTrue(rStats4.equals(stats3)); + Assert.assertEquals(rStats4, stats4); + Assert.assertEquals(rStats4, stats3); - Assert.assertTrue(rStats3.equals(rStats3)); - Assert.assertFalse(rStats3.equals(this)); - Assert.assertFalse(rStats2.equals(rStats3)); + Assert.assertEquals(rStats3, rStats3); + Assert.assertNotEquals(rStats3, this); + Assert.assertNotEquals(rStats2, rStats3); // 3. delete files dis.close(); - file.delete(); + Files.exists(path); Review Comment: deleteIfExists -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org