mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-27 00:31:42 +00:00
MINOR: fix getter for failed rows sample (#16796)
* deep copy the returned test case * added comment about deep copy * use JsonUtils.deepCopy
This commit is contained in:
parent
7ddd8d7938
commit
80653c6988
@ -790,6 +790,8 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
||||
"failedRowsSample",
|
||||
JsonUtils.pojoToJson(tableData));
|
||||
setFieldsInternal(testCase, Fields.EMPTY_FIELDS);
|
||||
// deep copy the test case to avoid updating the cached entity
|
||||
testCase = JsonUtils.deepCopy(testCase, TestCase.class);
|
||||
return testCase.withFailedRowsSample(tableData);
|
||||
}
|
||||
|
||||
@ -999,7 +1001,7 @@ public class TestCaseRepository extends EntityRepository<TestCase> {
|
||||
Entity.TABLE, table.getColumns(), table.getFullyQualifiedName(), true);
|
||||
List<TagLabel> tags = daoCollection.tagUsageDAO().getTags(table.getFullyQualifiedName());
|
||||
table.setTags(tags);
|
||||
return maskSampleData(testCase.getFailedRowsSample(), table, table.getColumns());
|
||||
return maskSampleData(sampleData, table, table.getColumns());
|
||||
}
|
||||
return sampleData;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user