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

fix(assistant-v2): fix integration test for assistant v2 #683

Merged
merged 2 commits into from
Sep 14, 2021

Conversation

nan2iz
Copy link
Contributor

@nan2iz nan2iz commented Sep 14, 2021

Thanks @kevinkowa for helping me fixing the issue on integration testing. I updated the PR based on our pair programming.

@nan2iz nan2iz requested a review from kevinkowa September 14, 2021 20:34
Comment on lines +329 to 331
yield return null;

MessageResponseStateless messageResponse = null;
Copy link
Contributor

Choose a reason for hiding this comment

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

we also need to delete the session, something like this is needed at the end of the test

object deleteSessionResponse = null;
            Log.Debug("AssistantV2IntegrationTests", "Attempting to DeleteSession...");
            service.WithHeader("X-Watson-Test", "1");
            service.DeleteSession(
                callback: (DetailedResponse<object> response, IBMError error) =>
                {
                    Log.Debug("AssistantV2IntegrationTests", "result: {0}", response.Response);
                    deleteSessionResponse = response.Result;
                    Assert.IsNotNull(response.Result);
                    Assert.IsNull(error);
                },
                assistantId: assistantId,
                sessionId: sessionId
            );

            while (deleteSessionResponse == null)
                yield return null;

Copy link
Contributor

@kevinkowa kevinkowa left a comment

Choose a reason for hiding this comment

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

LGTM! Lets merge when the tests pass

@nan2iz nan2iz merged commit 2620cd0 into master Sep 14, 2021
@nan2iz nan2iz deleted the unity-sdk-9721 branch September 14, 2021 21:14
@watson-github-bot
Copy link
Member

🎉 This PR is included in version 5.2.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

3 participants