Commit 2322bd0
authored
Fix test server to return INVALID_ARGUMENT for UNHANDLED_COMMAND (#2757)
The real Temporal server returns INVALID_ARGUMENT error when a workflow
task has unhandled commands. The test server was silently recording the
failure in history but returning success to the caller, causing the SDK
to apply completion metrics before learning the task was rejected.
This fix makes the test server throw INVALID_ARGUMENT: UnhandledCommand
to match real server behavior, preventing double-counted metrics.
Also adds registry.clear() in MetricsTest setUp for clean state.1 parent 2ff9c2c commit 2322bd0
File tree
2 files changed
+5
-2
lines changed- temporal-sdk/src/test/java/io/temporal/client/functional
- temporal-test-server/src/main/java/io/temporal/internal/testservice
2 files changed
+5
-2
lines changedLines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
488 | 488 | | |
489 | 489 | | |
490 | 490 | | |
491 | | - | |
492 | | - | |
| 491 | + | |
| 492 | + | |
493 | 493 | | |
494 | 494 | | |
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
| 500 | + | |
499 | 501 | | |
500 | 502 | | |
501 | 503 | | |
| |||
0 commit comments