You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "weizhouapache (via GitHub)" <gi...@apache.org> on 2024/04/18 08:44:22 UTC

[PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

weizhouapache opened a new pull request, #8938:
URL: https://github.com/apache/cloudstack/pull/8938

   This fixes test failures in some PRs against main/4.20 branch
   
   
   ```
   Error:  Failures:
   Error:    ActionEventInterceptorTest.testInterceptComplete:247
   Error:    ActionEventInterceptorTest.testInterceptException:261
   Error:    ActionEventInterceptorTest.testInterceptStartAsync:234 expected:<Starting VM[.  Id: 0 Name: null]> but was:<Starting VM[]>
   ```
   
   ### Description
   
   This PR...
   <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- ******************************************************************************* -->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- ******************************************************************************* -->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [ ] Minor
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [ ] Major
   - [ ] Minor
   - [ ] Trivial
   
   
   ### Screenshots (if appropriate):
   
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to -->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   
   <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
   


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "vishesh92 (via GitHub)" <gi...@apache.org>.
vishesh92 commented on code in PR #8938:
URL: https://github.com/apache/cloudstack/pull/8938#discussion_r1572281317


##########
server/src/test/java/com/cloud/event/ActionEventInterceptorTest.java:
##########
@@ -172,6 +172,7 @@ public EventVO answer(InvocationOnMock invocation) throws Throwable {
         account.setId(ACCOUNT_ID);
         user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone",
                 UUID.randomUUID().toString(), User.Source.UNKNOWN);
+        CallContext.register(user, account);

Review Comment:
   @weizhouapache move `CallContext.unregister();` to tearDown?



-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8938:
URL: https://github.com/apache/cloudstack/pull/8938#discussion_r1572290467


##########
server/src/test/java/com/cloud/event/ActionEventInterceptorTest.java:
##########
@@ -172,6 +172,7 @@ public EventVO answer(InvocationOnMock invocation) throws Throwable {
         account.setId(ACCOUNT_ID);
         user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone",
                 UUID.randomUUID().toString(), User.Source.UNKNOWN);
+        CallContext.register(user, account);

Review Comment:
   good point @vishesh92 
   thanks



-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8938:
URL: https://github.com/apache/cloudstack/pull/8938#issuecomment-2066467433

   marked as "ready for review" as it fixes the failure with build CI


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8938:
URL: https://github.com/apache/cloudstack/pull/8938#issuecomment-2063816450

   > clgtm and fixes the issue locally for me.
   
   great, thanks @DaanHoogland 
   
   I kicked the build 3 times, all succeeded. https://github.com/apache/cloudstack/actions/runs/8734995428/job/23976479820?pr=8938


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on PR #8938:
URL: https://github.com/apache/cloudstack/pull/8938#issuecomment-2063347276

   Not sure if it fixes the issue, let's wait for the results of github actions


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed pull request #8938: test: fix test failures in ActionEventInterceptorTest
URL: https://github.com/apache/cloudstack/pull/8938


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache merged PR #8938:
URL: https://github.com/apache/cloudstack/pull/8938


-- 
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: commits-unsubscribe@cloudstack.apache.org

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


Re: [PR] test: fix test failures in ActionEventInterceptorTest [cloudstack]

Posted by "weizhouapache (via GitHub)" <gi...@apache.org>.
weizhouapache commented on code in PR #8938:
URL: https://github.com/apache/cloudstack/pull/8938#discussion_r1572292590


##########
server/src/test/java/com/cloud/event/ActionEventInterceptorTest.java:
##########
@@ -172,6 +172,7 @@ public EventVO answer(InvocationOnMock invocation) throws Throwable {
         account.setId(ACCOUNT_ID);
         user = new UserVO(1, "testuser", "password", "firstname", "lastName", "email", "timezone",
                 UUID.randomUUID().toString(), User.Source.UNKNOWN);
+        CallContext.register(user, account);

Review Comment:
   updated



-- 
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: commits-unsubscribe@cloudstack.apache.org

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