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

Updated Testcases for RemoteModel.java #1535

Closed
wants to merge 1 commit into from

Conversation

divitr
Copy link
Contributor

@divitr divitr commented Oct 23, 2023

Description

Updated Testcases for RemoteModel.java

Issues Resolved

Resolves #1382

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.33%. Comparing base (e9e3834) to head (0045637).
Report is 376 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #1535      +/-   ##
============================================
- Coverage     78.40%   78.33%   -0.07%     
+ Complexity     2378     2374       -4     
============================================
  Files           195      195              
  Lines          9588     9588              
  Branches        964      964              
============================================
- Hits           7517     7511       -6     
- Misses         1633     1639       +6     
  Partials        438      438              
Flag Coverage Δ
ml-commons 78.33% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@divitr divitr temporarily deployed to ml-commons-cicd-env October 24, 2023 01:06 — with GitHub Actions Inactive
@divitr divitr temporarily deployed to ml-commons-cicd-env October 24, 2023 01:06 — with GitHub Actions Inactive
@divitr divitr had a problem deploying to ml-commons-cicd-env October 24, 2023 01:06 — with GitHub Actions Failure
@divitr divitr temporarily deployed to ml-commons-cicd-env October 24, 2023 01:28 — with GitHub Actions Inactive
@divitr divitr had a problem deploying to ml-commons-cicd-env October 24, 2023 01:28 — with GitHub Actions Failure
@divitr divitr temporarily deployed to ml-commons-cicd-env October 24, 2023 01:28 — with GitHub Actions Inactive
@austintlee
Copy link
Collaborator

@dhrubo-os do you know why coverage went down with an addition of a test case?

Copy link
Collaborator

@austintlee austintlee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you are testing the right thing here.

Connector connector = createConnector(ImmutableMap.of("Authorization", "Bearer ${credential.key}"));
when(mlModel.getConnector()).thenReturn(connector);
remoteModel.initModel(mlModel, ImmutableMap.of(), encryptor);
Assert.assertTrue(remoteModel.isModelReady());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to be flaky due to timing?

@@ -65,6 +73,15 @@ public void predict_NullConnectorExecutor() {
remoteModel.predict(mlInput);
}

@Test
public void predict_ModelPredictSuccess() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"testXYZ" and no underscore.

when(mlModel.getConnector()).thenReturn(connector);
remoteModel.initModel(mlModel, ImmutableMap.of(), encryptor);
Assert.assertTrue(remoteModel.isModelReady());
when(remoteConnectorExecutor.executePredict(mlInput)).thenReturn(new ModelTensorOutput(new ArrayList<>()));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are you testing??

Copy link
Collaborator

@Zhangxunmt Zhangxunmt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to close this PR if there's still no response to Austin's comments. @divitr

@austintlee austintlee closed this Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]Improve test coverage for RemoteModel.java
3 participants