-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add acceptance test for deleting connetion #11563
Conversation
running into this error in the github builds
which seems to suggest that it's having problems finding the workflow in the temporal database. |
This reverts commit 0e53a27.
I found it weird that it didn’t work when i tried
but worked when i did the following
although i think if i can get the first approach to work, it would be better, since the log lines were not outputted here. I would need to find where to access the standard output of the acceptance tests. I verified that the test was actually ran by running it locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for improving the acceptance coverage! I only have minor comments.
|
||
// Terminate workflow | ||
LOGGER.info("Terminating temporal workflow..."); | ||
workflowCLient.newUntypedWorkflowStub("connection_manager_" + connectionId).terminate(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we extract the termination in its own method? It will be needed for other tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
workflowCLient.newUntypedWorkflowStub("connection_manager_" + connectionId).terminate(""); | ||
|
||
// expect an exception because the temporal workflow is not running | ||
Assertions.assertThatExceptionOfType(ApiException.class) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove that, it won't throw exception later on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
makes sense. removed
@@ -1147,6 +1152,57 @@ public void testCancelSyncWhenCancelledWhenWorkerIsNotRunning() throws Exception | |||
assertEquals(JobStatus.CANCELLED, resp.get().getJob().getStatus()); | |||
} | |||
|
|||
@Test | |||
@Order(22) | |||
@DisabledIfEnvironmentVariable(named = "KUBE", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to not run on Kube?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
originally i thought we would have to do some extra stuff to get it working on kube, but i guess that's not the case. it's been removed.
@benmoriceau PTAL. i refactored it to cover both the normal case and the temporal in a bad state case. |
What
Add an acceptance test to check that we are able to delete a connection during a normal state and even when the state of the temporal workflow is in a terminal state. This behavior was originally committed in this PR: #11302 with unit tests and verified manually, but lacked an acceptance test.