feat: add durable relative task delays and outage recovery regression

This commit is contained in:
2026-09-17 23:43:57 +08:00
parent 522fe2ef3e
commit a664ec9370
34 changed files with 811 additions and 28 deletions

View File

@@ -18,6 +18,13 @@ func TestBodyAndErrorBoundary(t *testing.T) {
{`{"retry":{"max_attempts":1},"Retry":{"max_attempts":2}}`, "application/json", "INVALID_ARGUMENT"},
{`{}`, "text/plain", "UNSUPPORTED_MEDIA_TYPE"},
{`{"payload":{"arbitrary_key":9007199254740993}}`, "application/json", ""},
{`{"delay_ms":1000}`, "application/json", ""},
{`{"delay_ms":null}`, "application/json", "INVALID_ARGUMENT"},
{`{"delay_ms":-1}`, "application/json", "INVALID_ARGUMENT"},
{`{"delay_ms":1.5}`, "application/json", "INVALID_ARGUMENT"},
{`{"delay_ms":"1000"}`, "application/json", "INVALID_ARGUMENT"},
{`{"delay_ms":18446744073709551616}`, "application/json", "INVALID_ARGUMENT"},
{`{"delay_ms":1,"delay_ms":2}`, "application/json", "INVALID_ARGUMENT"},
} {
r := httptest.NewRequest(http.MethodPost, "/v1/tasks", strings.NewReader(test.body))
r.Header.Set("Content-Type", test.content)