mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00
Fix test suite migrations for 1.1.x (#13037)
This commit is contained in:
parent
7d4957537c
commit
1bed16fa14
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user