Fix test suite migrations for 1.1.x (#13037)

This commit is contained in:
Sriharsha Chintalapani 2023-08-29 23:25:08 -07:00 committed by GitHub
parent 7d4957537c
commit 1bed16fa14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,9 +466,7 @@ public class MigrationUtil {
TestSuite stored; TestSuite stored;
try { try {
// If entity is found by Hash it is already migrated // If entity is found by Hash it is already migrated
testSuiteRepository testSuiteRepository.getDao().findEntityByName(testSuiteFqn, "nameHash", Include.ALL);
.getDao()
.findEntityByName(EntityInterfaceUtil.quoteName(testSuiteFqn), "nameHash", Include.ALL);
} catch (EntityNotFoundException entityNotFoundException) { } catch (EntityNotFoundException entityNotFoundException) {
try { try {
// Check if the test Suite Exists, this brings the data on nameHash basis // Check if the test Suite Exists, this brings the data on nameHash basis
@ -515,13 +513,7 @@ public class MigrationUtil {
newExecutableTestSuite.getId(), test.getId(), TEST_SUITE, TEST_CASE, Relationship.CONTAINS); newExecutableTestSuite.getId(), test.getId(), TEST_SUITE, TEST_CASE, Relationship.CONTAINS);
// Not a good approach but executable cannot be set true before // Not a good approach but executable cannot be set true before
TestSuite temp = TestSuite temp = testSuiteRepository.getDao().findEntityByName(testSuiteFqn, "nameHash", Include.ALL);
testSuiteRepository
.getDao()
.findEntityByName(
EntityInterfaceUtil.quoteName(FullyQualifiedName.buildHash(testSuiteFqn)),
"nameHash",
Include.ALL);
temp.setExecutable(true); temp.setExecutable(true);
testSuiteRepository.getDao().update("nameHash", temp); testSuiteRepository.getDao().update("nameHash", temp);
} catch (Exception exIgnore) { } catch (Exception exIgnore) {