Skip to content
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

[BUG] Data Engine test fail when mockito updated to v5 #7389

Open
planetf1 opened this issue Feb 1, 2023 · 5 comments
Open

[BUG] Data Engine test fail when mockito updated to v5 #7389

planetf1 opened this issue Feb 1, 2023 · 5 comments
Assignees
Labels
bug Something isn't working no-issue-activity Issues automatically marked as stale because they have not had recent activity. pinned Keep open (do not time out) triage New bug/issue which needs checking & assigning

Comments

@planetf1
Copy link
Member

planetf1 commented Feb 1, 2023

Existing/related issue?

No response

Current Behavior

Data Engine tests fail when mockito is updated

Error:    DataEngineRESTClientTest.upsertDataFile:105 » NullPointer Cannot invoke "org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse.getGUID()" because "restResult" is null
[38793](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38794)
Error:    DataEngineRESTClientTest.upsertDatabase:72 » NullPointer Cannot invoke "org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse.getGUID()" because "restResult" is null
[38794](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38795)
Error:    DataEngineRESTClientTest.upsertDatabaseSchema:83 » NullPointer Cannot invoke "org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse.getGUID()" because "restResult" is null
[38795](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38796)
Error:    DataEngineRESTClientTest.upsertRelationalTable:94 » NullPointer Cannot invoke "org.odpi.openmetadata.commonservices.ffdc.rest.GUIDResponse.getGUID()" because "restResult" is null
[38796](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38797)
[INFO] 
[38797](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38798)
Error:  Tests run: 13, Failures: 8, Errors: 4, Skipped: 0

Full run at https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061

one example is

Error:    DataEngineRESTClientTest.deleteFolder:162 
[38726](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38727)
Argument(s) are different! Wanted:
[38727](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38728)
connector.callDeleteRESTCall(
[38728](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38729)
    "deleteFolder",
[38729](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38730)
    class org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse,
[38730](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38731)
    <any string>,
[38731](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38732)
    <any>,
[38732](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38733)
    <any>
[38733](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38734)
);
[38734](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38735)
-> at org.odpi.openmetadata.accessservices.dataengine.client.DataEngineRESTClientTest.deleteFolder(DataEngineRESTClientTest.java:162)
[38735](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38736)
Actual invocations have different arguments:
[38736](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38737)
connector.callDeleteRESTCall(
[38737](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38738)
    "deleteFolder",
[38738](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38739)
    class org.odpi.openmetadata.commonservices.ffdc.rest.VoidResponse,
[38739](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38740)
    "https://localhost:9444/servers/{0}/open-metadata/access-services/data-engine/users/{1}/folders",
[38740](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38741)
    DeleteRequestBody(guid=null, qualifiedName=qualifiedName, deleteSemantic=DeleteSemantic.SOFT(ordinal=0, name=SOFT, description=Soft delete)),
[38741](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38742)
    "TestServer",
[38742](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38743)
    "zebra91",
[38743](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38744)
    []
[38744](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38745)
);
[38745](https://github.com/odpi/egeria/actions/runs/4062420403/jobs/6993457061#step:5:38746)
-> at org.odpi.openmetadata.commonservices.ffdc.rest.FFDCRESTClientBase.callDeleteRESTCall(FFDCRESTClientBase.java:419)

As can be seen - the number of parameters differs from what the test case expects. I suspect the earlier test plugin was not validating this correctly

Expected Behavior

tests pass

Steps To Reproduce

See #7372

This updates mockito 4.11.0 to 5.1.1

Environment

- Egeria:
- OS:
- Java:
- Browser (for UI issues):
- Additional connectors and integration:

Any Further Information?

The mockito update has been removed from the Feb dependabot updates

Once fixed, please update versions of dependabot in pom.xml/build.gradle as appropriate

(Note: this test failure was in maven - gradle passed, so please also verify tests are running ok in gradle)

@planetf1 planetf1 added bug Something isn't working triage New bug/issue which needs checking & assigning labels Feb 1, 2023
@planetf1 planetf1 changed the title [BUG] <title> [BUG] Data Engine test fail when mockito updated to v5 Feb 1, 2023
@planetf1
Copy link
Member Author

planetf1 commented Mar 1, 2023

Mockito was updated to 5.1.1 in this month's dependabot, and this issue does not occur
(gradle only)

@planetf1
Copy link
Member Author

planetf1 commented Mar 1, 2023

This issue is appearing up again as other dependencies are updated. It does not occur with the older mockito version
This needs further investigation

@planetf1
Copy link
Member Author

Any thoughts on this @popa-raluca @mandy-chessell

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 20 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the no-issue-activity Issues automatically marked as stale because they have not had recent activity. label May 19, 2023
@planetf1 planetf1 added the pinned Keep open (do not time out) label May 23, 2023
@planetf1
Copy link
Member Author

@ljupcho this is probably one for you if handling dependencies & the data engine work in your team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working no-issue-activity Issues automatically marked as stale because they have not had recent activity. pinned Keep open (do not time out) triage New bug/issue which needs checking & assigning
Projects
None yet
Development

No branches or pull requests

2 participants