@@ -1274,9 +1274,11 @@ public void testDeletePushNotificationConfigSetWithoutConfigId() throws Exceptio
12741274 @ Test
12751275 @ Timeout (value = 1 , unit = TimeUnit .MINUTES )
12761276 public void testNonBlockingWithMultipleMessages () throws Exception {
1277+ String multiEventTaskId = "multi-event-test-" + java .util .UUID .randomUUID ();
1278+ try {
12771279 // 1. Send first non-blocking message to create task in WORKING state
12781280 Message message1 = Message .builder (MESSAGE )
1279- .taskId ("multi-event-test" )
1281+ .taskId (multiEventTaskId )
12801282 .contextId ("test-context" )
12811283 .parts (new TextPart ("First request" ))
12821284 .build ();
@@ -1301,7 +1303,7 @@ public void testNonBlockingWithMultipleMessages() throws Exception {
13011303 assertTrue (firstTaskLatch .await (10 , TimeUnit .SECONDS ));
13021304 String taskId = taskIdRef .get ();
13031305 assertNotNull (taskId );
1304- assertEquals ("multi-event-test" , taskId );
1306+ assertEquals (multiEventTaskId , taskId );
13051307
13061308 // 2. Resubscribe to task (queue should still be open)
13071309 CountDownLatch resubEventLatch = new CountDownLatch (2 ); // artifact-2 + completion
@@ -1337,7 +1339,7 @@ public void testNonBlockingWithMultipleMessages() throws Exception {
13371339
13381340 // 3. Send second streaming message to same taskId
13391341 Message message2 = Message .builder (MESSAGE )
1340- .taskId ("multi-event-test" ) // Same taskId
1342+ .taskId (multiEventTaskId ) // Same taskId
13411343 .contextId ("test-context" )
13421344 .parts (new TextPart ("Second request" ))
13431345 .build ();
@@ -1411,6 +1413,9 @@ public void testNonBlockingWithMultipleMessages() throws Exception {
14111413 assertEquals ("artifact-2" , streamArtifact .artifact ().artifactId ());
14121414 assertEquals ("Second message artifact" ,
14131415 ((TextPart ) streamArtifact .artifact ().parts ().get (0 )).text ());
1416+ } finally {
1417+ deleteTaskInTaskStore (multiEventTaskId );
1418+ }
14141419 }
14151420
14161421 @ Test
0 commit comments