Skip to content

Commit 7cb5fd7

Browse files
authored
chore(test): workflow events are lost after restarting PHP worker
1 parent bcb1d0a commit 7cb5fd7

File tree

2 files changed

+6
-30
lines changed

2 files changed

+6
-30
lines changed

tests/general/worker_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ func Test_ResetWorkerWorkflow(t *testing.T) {
3939
time.Sleep(time.Second)
4040

4141
// Query the workflow to kill the worker - this should timeout
42-
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
43-
_, err = s.Client.QueryWorkflow(ctx, w.GetID(), w.GetRunID(), "die", nil)
42+
ctx, cancel := context.WithTimeout(context.Background(), 4 * time.Second)
43+
_, err = s.Client.QueryWorkflow(ctx, w.GetID(), w.GetRunID(), "die", 1)
4444
cancel()
4545

4646
// Should fail with a timeout since the worker dies during query execution
4747
require.Error(t, err)
48-
48+
4949
// Cancel the workflow
5050
ctx, cancel = context.WithTimeout(context.Background(), 5*time.Second)
5151
err = s.Client.CancelWorkflow(ctx, w.GetID(), w.GetRunID())

tests/php_test_files/composer.json

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,8 @@
22
"minimum-stability": "dev",
33
"prefer-stable": true,
44
"require": {
5-
"ext-curl": "*",
6-
"guzzlehttp/guzzle": "^6.5",
7-
"nyholm/psr7": "^1.5",
8-
"spiral/roadrunner-http": "^3.0",
9-
"spiral/roadrunner-worker": "^3.0",
10-
"temporal/sdk": "^2.8.1",
11-
"spiral/tokenizer": ">=2.7",
12-
"spiral/roadrunner-metrics": "^3.0",
13-
"spiral/roadrunner-grpc": "^3.0",
14-
"spiral/roadrunner-tcp": "^3.0",
15-
"spiral/roadrunner-jobs": "^4.0",
16-
"monolog/monolog": "^3.1",
17-
"php-http/guzzle6-adapter": "~2",
18-
"spiral/goridge": "^4.0",
19-
"roadrunner-php/centrifugo": "^2.0",
20-
"roadrunner-php/app-logger": "^1.0",
21-
"open-telemetry/sdk": "^0.0.10",
22-
"psr/http-factory": "^1.0",
23-
"php-http/message-factory": "^1.1",
24-
"spiral/roadrunner-kv": "^4.0",
25-
"spiral/roadrunner-services": "^2.0"
5+
"temporal/sdk": "^2.15.1",
6+
"spiral/roadrunner-kv": "^4.0"
267
},
278
"name": "test/test",
289
"autoload": {
@@ -31,10 +12,5 @@
3112
"Temporal\\Tests\\": "src"
3213
}
3314
},
34-
"description": "test",
35-
"config": {
36-
"allow-plugins": {
37-
"php-http/discovery": true
38-
}
39-
}
15+
"description": "test"
4016
}

0 commit comments

Comments
 (0)