Skip to content

Commit

Permalink
test: fix test failures in ActionEventInterceptorTest
Browse files Browse the repository at this point in the history
```
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[]>
```
  • Loading branch information
weizhouapache committed Apr 18, 2024
1 parent 7de8a6d commit 8916032
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Mockito.when(accountDao.findById(ACCOUNT_ID)).thenReturn(account);
}
Expand Down Expand Up @@ -265,7 +266,6 @@ public void testInterceptException() throws NoSuchMethodException {

@Test
public void testInterceptExceptionResource() throws NoSuchMethodException {
CallContext.register(user, account);
Long resourceId = 1L;
ApiCommandResourceType resourceType = ApiCommandResourceType.VirtualMachine;
CallContext.current().setEventResourceId(resourceId);
Expand Down

0 comments on commit 8916032

Please sign in to comment.