Skip to content

Commit 4b95ebc

Browse files
committed
update sessionlog tests
1 parent 1f1f676 commit 4b95ebc

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/SessionLogAsyncTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929
public class SessionLogAsyncTest extends ClientTestBase {
3030
private static final String AGENT_NAME = "MySessionHostedAgent3";
3131
private static final String AGENT_VERSION = "16";
32-
private static final String ISOLATION_KEY = "sse-validation";
3332
private static final String SESSION_ID = "sse-validation-record-async";
3433

3534
@RecordWithoutRequestBody
@@ -42,7 +41,7 @@ public void validatesSessionLogStream(HttpClient httpClient, AgentsServiceVersio
4241

4342
deleteSession(client);
4443
AgentSessionResource session = client
45-
.createSessionWithResponse(AGENT_NAME, ISOLATION_KEY,
44+
.createSessionWithResponse(AGENT_NAME,
4645
BinaryData.fromObject(new com.azure.ai.agents.implementation.models.CreateSessionRequest(
4746
new VersionRefIndicator(AGENT_VERSION)).setAgentSessionId(SESSION_ID)),
4847
featureOptions)
@@ -78,8 +77,7 @@ private static void deleteSession(AgentsAsyncClient client) {
7877
}
7978

8079
private static Mono<Void> deleteSessionAsync(AgentsAsyncClient client) {
81-
return client
82-
.deleteSession(AGENT_NAME, SESSION_ID, ISOLATION_KEY, AgentDefinitionOptInKeys.HOSTED_AGENTS_V1_PREVIEW)
80+
return client.deleteSession(AGENT_NAME, SESSION_ID, AgentDefinitionOptInKeys.HOSTED_AGENTS_V1_PREVIEW)
8381
.onErrorResume(error -> Mono.empty());
8482
}
8583

sdk/ai/azure-ai-agents/src/test/java/com/azure/ai/agents/SessionLogSyncTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434
public class SessionLogSyncTest extends ClientTestBase {
3535
private static final String AGENT_NAME = "MySessionHostedAgent3";
3636
private static final String AGENT_VERSION = "16";
37-
private static final String ISOLATION_KEY = "sse-validation";
3837
private static final String SESSION_ID = "sse-validation-record-sync";
3938

4039
@RecordWithoutRequestBody
@@ -47,7 +46,7 @@ public void validatesSessionLogStream(HttpClient httpClient, AgentsServiceVersio
4746

4847
deleteSession(client);
4948
AgentSessionResource session = client
50-
.createSessionWithResponse(AGENT_NAME, ISOLATION_KEY,
49+
.createSessionWithResponse(AGENT_NAME,
5150
BinaryData.fromObject(new com.azure.ai.agents.implementation.models.CreateSessionRequest(
5251
new VersionRefIndicator(AGENT_VERSION)).setAgentSessionId(SESSION_ID)),
5352
featureOptions)
@@ -88,8 +87,7 @@ private ScheduledFuture<?> scheduleSessionDelete(AgentsClient client, ScheduledE
8887

8988
private static void deleteSession(AgentsClient client) {
9089
try {
91-
client.deleteSession(AGENT_NAME, SESSION_ID, ISOLATION_KEY,
92-
AgentDefinitionOptInKeys.HOSTED_AGENTS_V1_PREVIEW);
90+
client.deleteSession(AGENT_NAME, SESSION_ID, AgentDefinitionOptInKeys.HOSTED_AGENTS_V1_PREVIEW);
9391
} catch (RuntimeException ignored) {
9492
// Cleanup best effort.
9593
}

0 commit comments

Comments
 (0)