Skip to content

Commit 541ef6b

Browse files
authored
Updated E2E tests to use latest stable Dapr version for CLI and runtime (#686)
* Updated E2E tests + loosened timings on actor E2E tests to use latest stable Dapr version for CLI and runtime Signed-off-by: Whit Waldo <[email protected]>
1 parent 746673c commit 541ef6b

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

.github/workflows/test-e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
runs-on: ubuntu-latest
3636
env:
3737
GOVER: 1.22
38-
DAPR_CLI_VER: 1.14.0
39-
DAPR_RUNTIME_VER: 1.14.1
38+
DAPR_CLI_VER: 1.15.0
39+
DAPR_RUNTIME_VER: 1.15.3
4040
DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/master/install/install.sh
4141
DAPR_CLI_REF: ""
4242
DAPR_REF: ""

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,21 @@
66
"scripts": {
77
"test": "npm run test:unit:all && npm run test:e2e:all",
88
"test:load": "jest --runInBand --detectOpenHandles",
9-
"test:load:http": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --components-path ./test/components -- npm run test:load 'test/load'",
9+
"test:load:http": "TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --resources-path ./test/components -- npm run test:load 'test/load'",
1010
"test:e2e": "jest --runInBand --detectOpenHandles",
1111
"test:e2e:all": "npm run test:e2e:http && npm run test:e2e:grpc && npm run test:e2e:common && npm run test:e2e:workflow",
1212
"test:e2e:grpc": "npm run test:e2e:grpc:client && npm run test:e2e:grpc:server && npm run test:e2e:grpc:clientWithApiToken",
13-
"test:e2e:grpc:client": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --components-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*client.test.ts' ]",
14-
"test:e2e:grpc:clientWithApiToken": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 DAPR_API_TOKEN=test dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --components-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/clientWithApiToken.test.ts' ]",
15-
"test:e2e:grpc:server": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --dapr-http-max-request-size 10 --components-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*server.test.ts' ]",
13+
"test:e2e:grpc:client": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*client.test.ts' ]",
14+
"test:e2e:grpc:clientWithApiToken": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 DAPR_API_TOKEN=test dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/clientWithApiToken.test.ts' ]",
15+
"test:e2e:grpc:server": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol grpc --app-port 50001 --dapr-grpc-port 50000 --max-body-size 10Mi --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/grpc/*server.test.ts' ]",
1616
"test:e2e:http": "npm run test:e2e:http:client && npm run test:e2e:http:server && npm run test:e2e:http:actors",
17-
"test:e2e:http:client": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --components-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(client).test.ts' ]",
18-
"test:e2e:http:server": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --dapr-http-max-request-size 10 --components-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(server).test.ts' ]",
19-
"test:e2e:http:actors": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --components-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/actors.test.ts' ]",
17+
"test:e2e:http:client": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(client).test.ts' ]",
18+
"test:e2e:http:server": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --max-body-size 10Mi --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/(server).test.ts' ]",
19+
"test:e2e:http:actors": "npm run prebuild && TEST_SECRET_1=secret_val_1 TEST_SECRET_2=secret_val_2 dapr run --app-id test-suite --app-protocol http --app-port 50001 --dapr-http-port 50000 --resources-path ./test/components -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/http/actors.test.ts' ]",
2020
"test:e2e:common": "npm run test:e2e:common:client && npm run test:e2e:common:server",
2121
"test:e2e:common:client": "./scripts/test-e2e-common.sh client",
2222
"test:e2e:common:server": "./scripts/test-e2e-common.sh server",
23-
"test:e2e:workflow": "npm run prebuild && dapr run --app-id workflow-test-suite --app-protocol grpc --dapr-grpc-port 4001 --components-path ./test/components/workflow -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/workflow/workflow.test.ts' ]",
23+
"test:e2e:workflow": "npm run prebuild && dapr run --app-id workflow-test-suite --app-protocol grpc --dapr-grpc-port 4001 --resources-path ./test/components/workflow -- jest --runInBand --detectOpenHandles --testMatch [ '**/test/e2e/workflow/workflow.test.ts' ]",
2424
"test:e2e:workflow:internal": "jest test/e2e/workflow --runInBand --detectOpenHandles",
2525
"test:e2e:workflow:durabletask": "./scripts/test-e2e-workflow.sh",
2626
"test:unit": "jest --runInBand --detectOpenHandles",

test/actor/DemoActorReminderImpl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export default class DemoActorReminderImpl extends AbstractActor implements Demo
2020
async init(): Promise<string> {
2121
await super.registerActorReminder(
2222
"my-reminder-name",
23-
Temporal.Duration.from({ milliseconds: 1500 }),
23+
Temporal.Duration.from({ milliseconds: 1000 }),
2424
Temporal.Duration.from({ seconds: 1 }),
2525
undefined,
2626
123,

test/actor/DemoActorReminderTtlImpl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ export default class DemoActorReminderTtlImpl extends AbstractActor implements D
2020
async init(): Promise<string> {
2121
await super.registerActorReminder(
2222
"my-reminder-name",
23-
Temporal.Duration.from({ milliseconds: 1500 }), //dueTime
24-
Temporal.Duration.from({ seconds: 1 }), //period
23+
Temporal.Duration.from({ milliseconds: 1000 }), //dueTime
24+
Temporal.Duration.from({ milliseconds: 2000 }), //period
2525
Temporal.Duration.from({ seconds: 1 }), //ttl
2626
123,
2727
);

test/e2e/http/actors.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,8 @@ describe("http/actors", () => {
360360
const res0 = await actor.getCounter();
361361
expect(res0).toEqual(0);
362362

363-
// Now we wait for dueTime (1.5s)
364-
await NodeJSUtil.sleep(1500);
363+
// Now we wait for dueTime (1s)
364+
await NodeJSUtil.sleep(1200);
365365

366366
// After that the reminder callback will be called
367367
// In our case, the callback increments the count attribute
@@ -370,10 +370,10 @@ describe("http/actors", () => {
370370

371371
await actor.removeReminder();
372372

373-
// Now we wait an extra period - duration (1s)
374-
await new Promise((resolve) => setTimeout(resolve, 1000));
373+
// Now we wait an extra period - duration (seconds)
374+
await new Promise((resolve) => setTimeout(resolve, 1500));
375375

376-
// Make sure the counter didn't change as we removed it
376+
// Make sure the counter didn't change since we removed the reminder
377377
const res2 = await actor.getCounter();
378378
expect(res2).toEqual(123);
379379
});

0 commit comments

Comments
 (0)