Skip to content

Commit

Permalink
[fix](regression) add exception when can not find profile with specif…
Browse files Browse the repository at this point in the history
…ic tag
  • Loading branch information
LiBinfeng-01 committed Nov 25, 2024
1 parent 11276d1 commit e18042b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ class ProfileAction implements SuiteAction {

def jsonSlurper = new JsonSlurper()
List profileData = jsonSlurper.parseText(body).data.rows
def canFindProfile = false;
for (final def profileItem in profileData) {
if (profileItem["Sql Statement"].toString().contains(tag)) {
canFindProfile = true
def profileId = profileItem["Profile ID"].toString()

def profileCli = new HttpCliAction(context)
Expand Down Expand Up @@ -113,6 +115,9 @@ class ProfileAction implements SuiteAction {
break
}
}
if (!canFindProfile) {
throw new IllegalStateException("Missing profile with tag: " + tag)
}
}
httpCli.run()
} finally {
Expand Down

0 comments on commit e18042b

Please sign in to comment.