You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/12/11 14:21:05 UTC

[shardingsphere] branch master updated: Refactor IntegrationTestCasesLoader (#22811)

This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/master by this push:
     new c48dedf45c8 Refactor IntegrationTestCasesLoader (#22811)
c48dedf45c8 is described below

commit c48dedf45c8aa41638898b945d8ff38ee3d63c49
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun Dec 11 22:20:59 2022 +0800

    Refactor IntegrationTestCasesLoader (#22811)
---
 .../shardingsphere/test/e2e/cases/IntegrationTestCasesLoader.java      | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/cases/IntegrationTestCasesLoader.java b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/cases/IntegrationTestCasesLoader.java
index c926433d2a7..8f809483bc8 100644
--- a/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/cases/IntegrationTestCasesLoader.java
+++ b/test/e2e/suite/src/test/java/org/apache/shardingsphere/test/e2e/cases/IntegrationTestCasesLoader.java
@@ -65,8 +65,7 @@ public final class IntegrationTestCasesLoader {
      * @return integration test case contexts
      */
     public Collection<IntegrationTestCaseContext> getTestCaseContexts(final SQLCommandType sqlCommandType) {
-        testCaseContexts.putIfAbsent(sqlCommandType, loadIntegrationTestCaseContexts(sqlCommandType));
-        return testCaseContexts.get(sqlCommandType);
+        return testCaseContexts.computeIfAbsent(sqlCommandType, this::loadIntegrationTestCaseContexts);
     }
     
     @SneakyThrows({IOException.class, URISyntaxException.class, JAXBException.class})