GOODBOY008 commented on PR #23960: URL: https://github.com/apache/flink/pull/23960#issuecomment-1962781516
@Jiabao-Sun @1996fanrui @snuyanzin I compare with ci log between master (https://github.com/apache/flink/actions/runs/8002818046/job/21857253878) and this pr (https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=57835&view=logs&j=0da23115-68bb-5dcd-192c-bd4c8adebde1&t=24c3384f-1bcb-57b3-224f-51bf973bbee8). The unit test amount is correct. - The result is below, PR unit test amount more than master, becuase of some test contain `Assume` to ignore some test in master branch: ``` diff: org.apache.flink.core.fs.local.LocalFileSystemTest 12 13 diff: org.apache.flink.runtime.state.filesystem.FsCheckpointStateOutputStreamTest 22 24 diff: org.apache.flink.runtime.blob.BlobCacheDeleteTest 9 11 diff: org.apache.flink.runtime.webmonitor.handlers.JarDeleteHandlerTest 2 3 diff: org.apache.flink.runtime.blob.BlobServerGetTest 11 13 diff: org.apache.flink.runtime.execution.librarycache.BlobLibraryCacheManagerTest 20 22 diff: org.apache.flink.util.FileUtilsTest 21 22 diff: org.apache.flink.runtime.blob.BlobCacheGetTest 9 17 diff: org.apache.flink.runtime.blob.BlobServerPutTest 21 30 diff: org.apache.flink.runtime.rest.RestServerEndpointTest 2 3 diff: org.apache.flink.runtime.blob.BlobServerDeleteTest 13 16 diff: org.apache.flink.contrib.streaming.state.RocksDBStateBackendConfigTest 30 31 diff: org.apache.flink.runtime.taskexecutor.TaskManagerRunnerStartupTest 3 4 diff: org.apache.flink.runtime.blob.BlobCachePutTest 19 28 diff key between master and aiden: org.apache.flink.runtime.blob.BlobUtilsNonWritableTest ``` - The code is below: ``` public static void main(String[] args) { // 2024-02-22T10:56:50.1618765Z Feb 22 10:56:50 10:56:50.161 [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 7.173 s -- in org.apache.flink.state.api.DataSetMemoryStateBackendReaderKeyedStateITCase // extract the number of tests by regex Map<String, Integer> aidenMap = new HashMap<>(); Map<String, Integer> masterMap = new HashMap<>(); FileUtil.readUtf8Lines("D:\\opt\\aiden.txt").forEach(log -> extracted(log, aidenMap)); FileUtil.readUtf8Lines("D:\\opt\\core.txt").forEach(log -> extracted(log, masterMap)); masterMap.forEach((key, value) -> { if (aidenMap.containsKey(key)) { if (!Objects.equals(value, aidenMap.get(key))) { System.out.println("diff: " + key + " " + value + " " + aidenMap.get(key)); } } else { System.out.println("not found: " + key); } }); // diff masterMap and aidenMap by key CollUtil.disjunction(masterMap.keySet(), aidenMap.keySet()).forEach(key -> System.out.println("diff key between master and aiden: " + key)); } private static void extracted(String log, Map<String, Integer> map) { // 正则表达式匹配数字和类名 String regex = "Tests run: (\\d+).*in (.*)"; Pattern pattern = Pattern.compile(regex); Matcher matcher = pattern.matcher(log); // 找到匹配项并打印 if (matcher.find()) { String testRun = matcher.group(1); String className = matcher.group(2); map.put(className, Integer.parseInt(testRun)); } } ``` -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
