Skip to content

Commit f9ed53a

Browse files
committed
test(appserver): require canonical initialized notification
1 parent c83425e commit f9ed53a

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

‎src/test/java/io/github/easy4j/codex/appserver/CodexAppServerClientE2ETest.java‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,12 @@ void shouldSendInitializeHandshake() throws Exception {
171171
List<String> methods = server.receivedFrames().stream()
172172
.map(this::methodOf)
173173
.toList();
174-
assertTrue(methods.contains("initialize"), "generic RPC calls must open with the initialize handshake");
175-
assertTrue(methods.contains("initialized"), "initialize must be followed by the initialized notification");
174+
assertTrue(methods.size() >= 3, "initialize handshake and business request must all be present");
175+
assertEquals("initialize", methods.get(0));
176+
assertEquals("notifications/initialized", methods.get(1),
177+
"initialize response must be acknowledged with the official notification name");
178+
assertEquals("thread/list", methods.get(2),
179+
"business RPC must follow the initialized acknowledgement");
176180
}
177181
}
178182

0 commit comments

Comments
 (0)