Skip to content

Commit c2ece3c

Browse files
committed
test: fix assertion for non-existent resource deletion
- Update test to assert no notification is sent when deleting non-existent resource - Replace expectation of notification with assertion that no notification occurs - Fail test if unexpected notification is received
1 parent 988fc94 commit c2ece3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/session_resource_helpers_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,12 +193,12 @@ func TestDeleteSessionResources(t *testing.T) {
193193
err = server.DeleteSessionResources(session.SessionID(), "test://nonexistent")
194194
require.NoError(t, err)
195195

196-
// Verify another notification was sent
196+
// Verify no notification is sent for non-existent resource deletion
197197
select {
198-
case notification := <-sessionChan:
199-
assert.Equal(t, "notifications/resources/list_changed", notification.Method)
198+
case <-sessionChan:
199+
t.Error("Unexpected notification received when deleting non-existent resource")
200200
case <-time.After(100 * time.Millisecond):
201-
t.Error("Expected notification not received")
201+
// Expected: no notification for non-existent resource
202202
}
203203
}
204204

0 commit comments

Comments
 (0)