Skip to content

Commit bd6ef76

Browse files
Fix Java test type mismatch: PingResult.timestamp is Long not String
The generated PingResult record has timestamp as Long (milliseconds), but tests were passing String values (ISO date format). Update tests to use Long millisecond values instead. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 817d2e5 commit bd6ef76

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

java/src/test/java/com/github/copilot/sdk/generated/rpc/GeneratedRpcRecordsCoverageTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ void pingParams_record() {
3232

3333
@Test
3434
void pingResult_record() {
35-
var result = new PingResult("pong", "2026-01-01T00:00:00Z", 2L);
35+
var result = new PingResult("pong", 1735689600000L, 2L);
3636
assertEquals("pong", result.message());
37-
assertEquals("2026-01-01T00:00:00Z", result.timestamp());
37+
assertEquals(1735689600000L, result.timestamp());
3838
assertEquals(2L, result.protocolVersion());
3939
}
4040

@@ -471,9 +471,9 @@ void sessionWorkspaceReadFileParams_record() {
471471

472472
@Test
473473
void pingResult_fields() {
474-
var result = new PingResult("pong", "2026-06-15T10:30:00Z", 1L);
474+
var result = new PingResult("pong", 1750000200000L, 1L);
475475
assertEquals("pong", result.message());
476-
assertEquals("2026-06-15T10:30:00Z", result.timestamp());
476+
assertEquals(1750000200000L, result.timestamp());
477477
assertEquals(1L, result.protocolVersion());
478478
}
479479

0 commit comments

Comments
 (0)