cdmikechen created SUBMARINE-1297: ------------------------------------- Summary: Modify the logic of mybatis to determine the test class Key: SUBMARINE-1297 URL: https://issues.apache.org/jira/browse/SUBMARINE-1297 Project: Apache Submarine Issue Type: Improvement Components: Backend Server Reporter: cdmikechen Fix For: 0.8.0
The current mybatis method for determining the test class is based on the following codes: {code:java} private static void checkCalledByTestMethod() { StackTraceElement[] stackTraceElements = Thread.currentThread().getStackTrace(); for (StackTraceElement element : stackTraceElements) { if (element.getClassName().endsWith("Test")) { usingTestDatabase(); return; } } } {code} Such code is clearly a hard code approach and may not cover all test methods by name. We should use something that is easier to determine and more precise -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@submarine.apache.org For additional commands, e-mail: dev-h...@submarine.apache.org