You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@submarine.apache.org by "cdmikechen (Jira)" <ji...@apache.org> on 2023/09/23 09:01:00 UTC
[jira] [Updated] (SUBMARINE-1297) Modify the logic of mybatis to determine the test class
[ https://issues.apache.org/jira/browse/SUBMARINE-1297?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
cdmikechen updated SUBMARINE-1297:
----------------------------------
Fix Version/s: 0.9.0
(was: 0.8.0)
> 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
> Priority: Major
> Fix For: 0.9.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-unsubscribe@submarine.apache.org
For additional commands, e-mail: dev-help@submarine.apache.org