Skip to content

Commit

Permalink
make enableSuite => get or create
Browse files Browse the repository at this point in the history
  • Loading branch information
baibaichen committed Feb 1, 2025
1 parent 1281743 commit 7a78eb0
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ abstract class BackendTestSettings {
}

protected def enableSuite(suiteName: String): SuiteSettings = {
if (enabledSuites.containsKey(suiteName)) {
throw new IllegalArgumentException("Duplicated suite name: " + suiteName)
if (!enabledSuites.containsKey(suiteName)) {
val suiteSettings = new SuiteSettings
enabledSuites.put(suiteName, suiteSettings)
enabledSuites.get(suiteName)
}
val suiteSettings = new SuiteSettings
enabledSuites.put(suiteName, suiteSettings)
suiteSettings
enabledSuites.get(suiteName)
}

private[utils] def shouldRun(suiteName: String, testName: String): Boolean = {
Expand Down

0 comments on commit 7a78eb0

Please sign in to comment.