-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new tests to CTS #7328
Add new tests to CTS #7328
Conversation
Signed-off-by: Mandy Chessell <mandy.e.chessell@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CodeQL found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
@@ -521,11 +521,11 @@ private void checkEndpointOK(ConnectionManager client, | |||
{ | |||
throw new FVTUnexpectedCondition(testCaseName, activityName + "(Bad qualifiedName from Retrieve) =>>" + retrievedEndpoint); | |||
} | |||
if (! endpointTechnicalName.equals(retrievedEndpoint.getTechnicalName())) | |||
if (! endpointTechnicalName.equals(retrievedEndpoint.getResourceName())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 7 similar findings have been found in this PR
YodaCondition: The non-constant portion of an equals check generally comes first.
if (! endpointTechnicalName.equals(retrievedEndpoint.getResourceName())) | |
if (! Objects.equals(retrievedEndpoint.getResourceName(), endpointTechnicalName)) |
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/connections/CreateConnectionTest.java | 528 |
open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java | 479 |
open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java | 450 |
open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/connections/CreateConnectionTest.java | 562 |
open-metadata-test/open-metadata-fvt/access-services-fvt/digital-architecture-fvt/src/main/java/org/odpi/openmetadata/accessservices/digitalarchitecture/fvt/connections/CreateConnectionTest.java | 558 |
open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java | 483 |
open-metadata-test/open-metadata-fvt/access-services-fvt/asset-owner-fvt/src/main/java/org/odpi/openmetadata/accessservices/assetowner/fvt/connections/CreateConnectionTest.java | 446 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
if (!expectedGUIDs.contains(matchGUID)) { | ||
if (knownStringValue.startsWith(truncatedStringValue)) | ||
{ | ||
for (String matchGUID : propValues.get(knownStringValue)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 7 similar findings have been found in this PR
INEFFICIENT_KEYSET_ITERATOR: Accessing a value using a key that was retrieved from a keySet
iterator. It is more efficient to use an iterator on the entrySet
of the map, avoiding the extra HashMap.get(key)
lookup.
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedEntitySearch.java | 2453 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedEntitySearch.java | 2466 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedEntitySearch.java | 1563 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedEntitySearch.java | 2479 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedEntitySearch.java | 1602 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedEntitySearch.java | 1589 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedEntitySearch.java | 2440 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
@@ -200,15 +220,17 @@ | |||
String end1DefName = relationshipDef.getEndDef1().getEntityType().getName(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 5 similar findings have been found in this PR
NULL_DEREFERENCE: object returned by TestSupportedRelationshipLifecycle.relationshipDef.getEndDef1().getEntityType()
could be null and is dereferenced at line 220.
🔎 Expand here to view all instances of this finding
File Path | Line Number |
---|---|
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedRelationshipLifecycle.java | 220 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedRelationshipLifecycle.java | 229 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestGraphQueries.java | 399 |
open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/graph-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/graphrepository/repositoryconnector/GraphOMRSMetadataStore.java | 418 |
open-metadata-conformance-suite/open-metadata-conformance-suite-server/src/main/java/org/odpi/openmetadata/conformance/tests/repository/instances/TestSupportedRelationshipLifecycle.java | 229 |
Visit the Lift Web Console to find more details in your report.
ℹ️ Learn about @sonatype-lift commands
You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.
Command | Usage |
---|---|
@sonatype-lift ignore |
Leave out the above finding from this PR |
@sonatype-lift ignoreall |
Leave out all the existing findings from this PR |
@sonatype-lift exclude <file|issue|path|tool> |
Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file |
Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
🛠 Lift Auto-fixSome of the Lift findings in this PR can be automatically fixed. You can download and apply these changes in your local project directory of your branch to review the suggestions before committing.1 # Download the patch
curl https://lift.sonatype.com/api/patch/github.com/odpi/egeria/7328.diff -o lift-autofixes.diff
# Apply the patch with git
git apply lift-autofixes.diff
# Review the changes
git diff Want it all in a single command? Open a terminal in your project's directory and copy and paste the following command: curl https://lift.sonatype.com/api/patch/github.com/odpi/egeria/7328.diff | git apply Once you're satisfied commit and push your changes in your project. Footnotes |
Signed-off-by: Mandy Chessell mandy.e.chessell@gmail.com
Description
This PR makes changes to the CTS to test the new getEntityDetailHistory and getRelationshipHistory methods. It also fixes the graph failure caused by its failure to set up the header correctly in entities.
Related Issue(s)
#7254
#7148
Testing
Running the CTS with in memory and graph
Release Notes & Documentation
No
Additional notes
This is the first of a number of PRs to expand the detail covered by the CTS