Skip to content

Commit 076790a

Browse files
committed
fix(integration-testing): fix intergration testing add deleteSessionRespondse
1 parent 2ed2368 commit 076790a

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

Tests/AssistantV2IntegrationTests.cs

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ public IEnumerator TestRuntimeResponseGenericRuntimeResponseTypeChannelTransfer(
308308
assistantId = Environment.GetEnvironmentVariable("ASSISTANT_ASSISTANT_ID");
309309

310310
string sessionId = null;
311-
311+
312312
SessionResponse createSessionResponse = null;
313313
Log.Debug("AssistantV2IntegrationTests", "Attempting to CreateSession...");
314314
service.WithHeader("X-Watson-Test", "1");
@@ -358,6 +358,24 @@ public IEnumerator TestRuntimeResponseGenericRuntimeResponseTypeChannelTransfer(
358358

359359
while (messageResponse == null)
360360
yield return null;
361+
362+
object deleteSessionResponse = null;
363+
Log.Debug("AssistantV2IntegrationTests", "Attempting to DeleteSession...");
364+
service.WithHeader("X-Watson-Test", "1");
365+
service.DeleteSession(
366+
callback: (DetailedResponse<object> response, IBMError error) =>
367+
{
368+
Log.Debug("AssistantV2IntegrationTests", "result: {0}", response.Response);
369+
deleteSessionResponse = response.Result;
370+
Assert.IsNotNull(response.Result);
371+
Assert.IsNull(error);
372+
},
373+
assistantId: assistantId,
374+
sessionId: sessionId
375+
);
376+
377+
while (deleteSessionResponse == null)
378+
yield return null;
361379
}
362380

363381
[TearDown]

0 commit comments

Comments
 (0)