You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "coderzc (via GitHub)" <gi...@apache.org> on 2023/11/22 08:55:45 UTC

[PR] Fix MiniKubeTest.testJobCancelled [incubator-hugegraph-computer]

coderzc opened a new pull request, #287:
URL: https://github.com/apache/incubator-hugegraph-computer/pull/287

   ## Main Changes
   
   Trying to fix MiniKubeTest.testJobCancelled
   
   For example:
   
   - If you introduce a new feature, please show detailed design here or add the link of design documentation.
   - If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
   - If there is a discussion in the mailing list, please add the link. -->
   
   ## Verifying these changes
   
   <!-- Please pick the proper options below -->
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests, such as *(please modify tests here)*.
   - [ ] Need tests and can be verified as follows.
       <!-- Please provide more details about verification
   
         For example:
         - If you test manually, please provide related screenshot.
        -->
   
   
   ## Does this PR potentially affect the following parts?
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [x]  Nope
   - [ ]  Dependencies (add/update license info) <!-- Don't forget to add/update the info in "LICENSE" & "NOTICE" files (both in root & dist module) -->
   - [ ]  Modify configurations
   - [ ]  The public API
   - [ ]  Other affects (typed here)
   
   ## Documentation Status
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ]  `Doc - TODO` <!-- Your PR changes impact docs and you will update later -->
   - [ ]  `Doc - Done` <!-- Related docs have been already added or updated -->
   - [x]  `Doc - No Need` <!-- Your PR changes don't impact/need docs -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] Fix MiniKubeTest.testJobCancelled [incubator-hugegraph-computer]

Posted by "coderzc (via GitHub)" <gi...@apache.org>.
coderzc closed pull request #287: Fix MiniKubeTest.testJobCancelled
URL: https://github.com/apache/incubator-hugegraph-computer/pull/287


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] Fix MiniKubeTest.testJobCancelled [incubator-hugegraph-computer]

Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #287:
URL: https://github.com/apache/incubator-hugegraph-computer/pull/287#issuecomment-1822425387

   ## [Codecov](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   Attention: `6 lines` in your changes are missing coverage. Please review.
   > Comparison is base [(`ff85e34`)](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/commit/ff85e34efaecb2a14ae72c0048a427a0aeb61bf3?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 85.03% compared to head [(`f0393ce`)](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) 85.12%.
   > Report is 3 commits behind head on master.
   
   | [Files](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...egraph/computer/algorithm/sampling/RandomWalk.java](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tcHV0ZXItYWxnb3JpdGhtL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWdlZ3JhcGgvY29tcHV0ZXIvYWxnb3JpdGhtL3NhbXBsaW5nL1JhbmRvbVdhbGsuamF2YQ==) | 92.06% | [2 Missing and 3 partials :warning: ](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   | [...computer/algorithm/sampling/RandomWalkMessage.java](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-Y29tcHV0ZXItYWxnb3JpdGhtL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9odWdlZ3JhcGgvY29tcHV0ZXIvYWxnb3JpdGhtL3NhbXBsaW5nL1JhbmRvbVdhbGtNZXNzYWdlLmphdmE=) | 94.11% | [1 Missing :warning: ](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   
   <details><summary>Additional details and impacted files</summary>
   
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #287      +/-   ##
   ============================================
   + Coverage     85.03%   85.12%   +0.08%     
   - Complexity     3246     3280      +34     
   ============================================
     Files           345      349       +4     
     Lines         12298    12406     +108     
     Branches       1102     1113      +11     
   ============================================
   + Hits          10458    10560     +102     
   - Misses         1315     1316       +1     
   - Partials        525      530       +5     
   ```
   
   
   
   </details>
   
   [:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/incubator-hugegraph-computer/pull/287?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] Fix MiniKubeTest.testJobCancelled [incubator-hugegraph-computer]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #287:
URL: https://github.com/apache/incubator-hugegraph-computer/pull/287#discussion_r1401870540


##########
.github/workflows/ci.yml:
##########
@@ -45,7 +45,7 @@ jobs:
         with:
           path: ~/hadoop-3.3.2.tar.gz
           key: ${{ runner.os }}--hadoop
-          restore-keys: ${{ runner.os }}-hadoop
+          restore-keys: ${{ runner.os }}--hadoop

Review Comment:
   Unexpected modifications?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] Fix MiniKubeTest.testJobCancelled [incubator-hugegraph-computer]

Posted by "javeme (via GitHub)" <gi...@apache.org>.
javeme commented on code in PR #287:
URL: https://github.com/apache/incubator-hugegraph-computer/pull/287#discussion_r1403392735


##########
computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java:
##########
@@ -246,6 +246,7 @@ public void testJobCancelled() {
         jobState.jobStatus(JobStatus.INITIALIZING);
         Mockito.verify(jobObserver, Mockito.timeout(15000L).atLeast(1))
                .onJobStateChanged(Mockito.eq(jobState));
+        Mockito.clearInvocations(jobObserver);
 
         this.driver.cancelJob(jobId, params);

Review Comment:
   should we also assert the returned value of `cancelJob()`



##########
computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java:
##########
@@ -246,6 +246,7 @@ public void testJobCancelled() {
         jobState.jobStatus(JobStatus.INITIALIZING);
         Mockito.verify(jobObserver, Mockito.timeout(15000L).atLeast(1))
                .onJobStateChanged(Mockito.eq(jobState));
+        Mockito.clearInvocations(jobObserver);

Review Comment:
   there is still an error:
   ```java
   Error:  Failures: 
   Error:    MiniKubeTest.testJobCancelled:258 
   Argument(s) are different! Wanted:
   jobObserver.onJobStateChanged(
       org.apache.hugegraph.computer.driver.DefaultJobState@393365e0
   );
   -> at org.apache.hugegraph.computer.k8s.MiniKubeTest.testJobCancelled(MiniKubeTest.java:258)
   Actual invocations have different arguments:
   jobObserver.onJobStateChanged(
       org.apache.hugegraph.computer.driver.DefaultJobState@3089df23
   );
   -> at org.apache.hugegraph.computer.k8s.driver.KubernetesDriver$1.eventReceived(KubernetesDriver.java:344)
   jobObserver.onJobStateChanged(
       org.apache.hugegraph.computer.driver.DefaultJobState@3089df23
   );
   -> at org.apache.hugegraph.computer.k8s.driver.KubernetesDriver$1.eventReceived(KubernetesDriver.java:344)
   
   [INFO] 
   Error:  Tests run: 565, Failures: 1, Errors: 0, Skipped: 0
   ```



##########
computer-test/src/main/java/org/apache/hugegraph/computer/k8s/MiniKubeTest.java:
##########
@@ -246,6 +246,7 @@ public void testJobCancelled() {
         jobState.jobStatus(JobStatus.INITIALIZING);
         Mockito.verify(jobObserver, Mockito.timeout(15000L).atLeast(1))
                .onJobStateChanged(Mockito.eq(jobState));
+        Mockito.clearInvocations(jobObserver);
 
         this.driver.cancelJob(jobId, params);
 

Review Comment:
   try to sleep() both before and after cancelJob?
   ```java
   sleep(1s)
   cancelJob()
   sleep(2s)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] Fix MiniKubeTest.testJobCancelled [incubator-hugegraph-computer]

Posted by "coderzc (via GitHub)" <gi...@apache.org>.
coderzc commented on code in PR #287:
URL: https://github.com/apache/incubator-hugegraph-computer/pull/287#discussion_r1401933330


##########
.github/workflows/ci.yml:
##########
@@ -45,7 +45,7 @@ jobs:
         with:
           path: ~/hadoop-3.3.2.tar.gz
           key: ${{ runner.os }}--hadoop
-          restore-keys: ${{ runner.os }}-hadoop
+          restore-keys: ${{ runner.os }}--hadoop

Review Comment:
   Revert



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org