rivetkit 2.0.7 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tsup/{chunk-B6N6VM37.js → chunk-2FAWAPRT.js} +2 -2
- package/dist/tsup/{chunk-7OOBMCQI.cjs → chunk-3WRAGTDC.cjs} +23 -22
- package/dist/tsup/chunk-3WRAGTDC.cjs.map +1 -0
- package/dist/tsup/{chunk-DIHKN7NM.js → chunk-3ZMJUIL3.js} +3 -3
- package/dist/tsup/{chunk-3ALZ7EGX.cjs → chunk-6INXQCH7.cjs} +11 -11
- package/dist/tsup/{chunk-3ALZ7EGX.cjs.map → chunk-6INXQCH7.cjs.map} +1 -1
- package/dist/tsup/{chunk-RLBM6D4L.js → chunk-A6TV3QU6.js} +3 -3
- package/dist/tsup/chunk-A6TV3QU6.js.map +1 -0
- package/dist/tsup/{chunk-F7YL5G7Q.cjs → chunk-CKSA7NOS.cjs} +232 -203
- package/dist/tsup/chunk-CKSA7NOS.cjs.map +1 -0
- package/dist/tsup/{chunk-54MAHBLL.js → chunk-DOZBWJRI.js} +2 -2
- package/dist/tsup/{chunk-LXAVET4A.cjs → chunk-DQVVH5ZK.cjs} +3 -3
- package/dist/tsup/{chunk-LXAVET4A.cjs.map → chunk-DQVVH5ZK.cjs.map} +1 -1
- package/dist/tsup/{chunk-KHRZPP5T.js → chunk-E77RVI3P.js} +68 -39
- package/dist/tsup/chunk-E77RVI3P.js.map +1 -0
- package/dist/tsup/{chunk-VAF63BEI.cjs → chunk-ESD2JX3L.cjs} +3 -3
- package/dist/tsup/{chunk-VAF63BEI.cjs.map → chunk-ESD2JX3L.cjs.map} +1 -1
- package/dist/tsup/{chunk-NDCVQZBS.cjs → chunk-FGOZELKN.cjs} +8 -8
- package/dist/tsup/{chunk-NDCVQZBS.cjs.map → chunk-FGOZELKN.cjs.map} +1 -1
- package/dist/tsup/{chunk-NUA6LOOJ.cjs → chunk-KDNB2BQX.cjs} +211 -200
- package/dist/tsup/chunk-KDNB2BQX.cjs.map +1 -0
- package/dist/tsup/{chunk-GWJTWY3G.cjs → chunk-KYEEAVJO.cjs} +6 -6
- package/dist/tsup/{chunk-GWJTWY3G.cjs.map → chunk-KYEEAVJO.cjs.map} +1 -1
- package/dist/tsup/{chunk-OSK2VSJF.cjs → chunk-L5MHM6JJ.cjs} +12 -12
- package/dist/tsup/{chunk-OSK2VSJF.cjs.map → chunk-L5MHM6JJ.cjs.map} +1 -1
- package/dist/tsup/{chunk-NII4KKHD.js → chunk-N7OVEOMU.js} +22 -11
- package/dist/tsup/chunk-N7OVEOMU.js.map +1 -0
- package/dist/tsup/{chunk-2NL3KGJ7.js → chunk-PVKV2O2E.js} +5 -4
- package/dist/tsup/chunk-PVKV2O2E.js.map +1 -0
- package/dist/tsup/{chunk-4EXJ4ITR.cjs → chunk-QGUQB3NC.cjs} +3 -3
- package/dist/tsup/{chunk-4EXJ4ITR.cjs.map → chunk-QGUQB3NC.cjs.map} +1 -1
- package/dist/tsup/{chunk-WAT5AE7S.js → chunk-RM2V2IRK.js} +5 -5
- package/dist/tsup/{chunk-NRELKXIX.js → chunk-S6EAEZQA.js} +3 -3
- package/dist/tsup/{chunk-YL4VZMMT.js → chunk-SFRRXLRM.js} +2 -2
- package/dist/tsup/{chunk-ETDWYT2P.cjs → chunk-TPJNKVFB.cjs} +7 -7
- package/dist/tsup/{chunk-ETDWYT2P.cjs.map → chunk-TPJNKVFB.cjs.map} +1 -1
- package/dist/tsup/{chunk-PD6HCAJE.js → chunk-WP7YG7S5.js} +2 -2
- package/dist/tsup/client/mod.cjs +9 -9
- package/dist/tsup/client/mod.d.cts +2 -2
- package/dist/tsup/client/mod.d.ts +2 -2
- package/dist/tsup/client/mod.js +8 -8
- package/dist/tsup/common/log.cjs +3 -3
- package/dist/tsup/common/log.js +2 -2
- package/dist/tsup/common/websocket.cjs +4 -4
- package/dist/tsup/common/websocket.js +3 -3
- package/dist/tsup/{conn-DdzHTm2E.d.cts → conn-ChAuuTr0.d.cts} +13 -1
- package/dist/tsup/{conn-DCSQgIlw.d.ts → conn-CjUkMEcm.d.ts} +13 -1
- package/dist/tsup/driver-helpers/mod.cjs +5 -5
- package/dist/tsup/driver-helpers/mod.d.cts +1 -1
- package/dist/tsup/driver-helpers/mod.d.ts +1 -1
- package/dist/tsup/driver-helpers/mod.js +4 -4
- package/dist/tsup/driver-test-suite/mod.cjs +103 -113
- package/dist/tsup/driver-test-suite/mod.cjs.map +1 -1
- package/dist/tsup/driver-test-suite/mod.d.cts +3 -1
- package/dist/tsup/driver-test-suite/mod.d.ts +3 -1
- package/dist/tsup/driver-test-suite/mod.js +45 -55
- package/dist/tsup/driver-test-suite/mod.js.map +1 -1
- package/dist/tsup/inspector/mod.cjs +6 -6
- package/dist/tsup/inspector/mod.d.cts +2 -2
- package/dist/tsup/inspector/mod.d.ts +2 -2
- package/dist/tsup/inspector/mod.js +5 -5
- package/dist/tsup/mod.cjs +10 -10
- package/dist/tsup/mod.d.cts +5 -5
- package/dist/tsup/mod.d.ts +5 -5
- package/dist/tsup/mod.js +9 -9
- package/dist/tsup/test/mod.cjs +11 -11
- package/dist/tsup/test/mod.d.cts +1 -1
- package/dist/tsup/test/mod.d.ts +1 -1
- package/dist/tsup/test/mod.js +10 -10
- package/dist/tsup/utils.cjs +2 -2
- package/dist/tsup/utils.js +1 -1
- package/package.json +2 -2
- package/src/actor/instance.ts +16 -3
- package/src/actor/router-endpoints.ts +2 -1
- package/src/actor/router.ts +27 -24
- package/src/client/actor-conn.ts +5 -1
- package/src/client/config.ts +2 -0
- package/src/driver-test-suite/mod.ts +11 -2
- package/src/driver-test-suite/tests/actor-schedule.ts +14 -37
- package/src/driver-test-suite/tests/actor-sleep.ts +18 -18
- package/src/drivers/engine/actor-driver.ts +39 -10
- package/src/drivers/file-system/manager.ts +5 -1
- package/src/manager/router.ts +11 -2
- package/src/registry/mod.ts +10 -1
- package/dist/tsup/chunk-2NL3KGJ7.js.map +0 -1
- package/dist/tsup/chunk-7OOBMCQI.cjs.map +0 -1
- package/dist/tsup/chunk-F7YL5G7Q.cjs.map +0 -1
- package/dist/tsup/chunk-KHRZPP5T.js.map +0 -1
- package/dist/tsup/chunk-NII4KKHD.js.map +0 -1
- package/dist/tsup/chunk-NUA6LOOJ.cjs.map +0 -1
- package/dist/tsup/chunk-RLBM6D4L.js.map +0 -1
- /package/dist/tsup/{chunk-B6N6VM37.js.map → chunk-2FAWAPRT.js.map} +0 -0
- /package/dist/tsup/{chunk-DIHKN7NM.js.map → chunk-3ZMJUIL3.js.map} +0 -0
- /package/dist/tsup/{chunk-54MAHBLL.js.map → chunk-DOZBWJRI.js.map} +0 -0
- /package/dist/tsup/{chunk-WAT5AE7S.js.map → chunk-RM2V2IRK.js.map} +0 -0
- /package/dist/tsup/{chunk-NRELKXIX.js.map → chunk-S6EAEZQA.js.map} +0 -0
- /package/dist/tsup/{chunk-YL4VZMMT.js.map → chunk-SFRRXLRM.js.map} +0 -0
- /package/dist/tsup/{chunk-PD6HCAJE.js.map → chunk-WP7YG7S5.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Transport, K as Registry, D as DriverConfig } from '../conn-
|
|
1
|
+
import { T as Transport, K as Registry, D as DriverConfig } from '../conn-ChAuuTr0.cjs';
|
|
2
2
|
import 'hono/streaming';
|
|
3
3
|
import 'hono/ws';
|
|
4
4
|
import '../utils.cjs';
|
|
@@ -14,6 +14,7 @@ interface SkipTests {
|
|
|
14
14
|
schedule?: boolean;
|
|
15
15
|
sleep?: boolean;
|
|
16
16
|
sse?: boolean;
|
|
17
|
+
inline?: boolean;
|
|
17
18
|
}
|
|
18
19
|
interface DriverTestConfig {
|
|
19
20
|
/** Deploys an registry and returns the connection endpoint. */
|
|
@@ -55,6 +56,7 @@ declare function createTestRuntime(registryPath: string, driverFactory: (registr
|
|
|
55
56
|
endpoint: string;
|
|
56
57
|
namespace: string;
|
|
57
58
|
runnerName: string;
|
|
59
|
+
token: string;
|
|
58
60
|
};
|
|
59
61
|
driver: DriverConfig;
|
|
60
62
|
cleanup?: () => Promise<void>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as Transport, K as Registry, D as DriverConfig } from '../conn-
|
|
1
|
+
import { T as Transport, K as Registry, D as DriverConfig } from '../conn-CjUkMEcm.js';
|
|
2
2
|
import 'hono/streaming';
|
|
3
3
|
import 'hono/ws';
|
|
4
4
|
import '../utils.js';
|
|
@@ -14,6 +14,7 @@ interface SkipTests {
|
|
|
14
14
|
schedule?: boolean;
|
|
15
15
|
sleep?: boolean;
|
|
16
16
|
sse?: boolean;
|
|
17
|
+
inline?: boolean;
|
|
17
18
|
}
|
|
18
19
|
interface DriverTestConfig {
|
|
19
20
|
/** Deploys an registry and returns the connection endpoint. */
|
|
@@ -55,6 +56,7 @@ declare function createTestRuntime(registryPath: string, driverFactory: (registr
|
|
|
55
56
|
endpoint: string;
|
|
56
57
|
namespace: string;
|
|
57
58
|
runnerName: string;
|
|
59
|
+
token: string;
|
|
58
60
|
};
|
|
59
61
|
driver: DriverConfig;
|
|
60
62
|
cleanup?: () => Promise<void>;
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getPort
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-RM2V2IRK.js";
|
|
4
4
|
import {
|
|
5
5
|
actor,
|
|
6
6
|
createManagerRouter
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-E77RVI3P.js";
|
|
8
8
|
import {
|
|
9
9
|
configureInspectorAccessToken,
|
|
10
10
|
createActorInspectorClient,
|
|
11
11
|
createManagerInspectorClient
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-WP7YG7S5.js";
|
|
13
13
|
import {
|
|
14
14
|
createClient
|
|
15
|
-
} from "../chunk-
|
|
15
|
+
} from "../chunk-3ZMJUIL3.js";
|
|
16
16
|
import {
|
|
17
17
|
ActorError,
|
|
18
18
|
createClientWithDriver
|
|
19
|
-
} from "../chunk-
|
|
20
|
-
import "../chunk-
|
|
19
|
+
} from "../chunk-N7OVEOMU.js";
|
|
20
|
+
import "../chunk-DOZBWJRI.js";
|
|
21
21
|
import {
|
|
22
22
|
importWebSocket
|
|
23
|
-
} from "../chunk-
|
|
23
|
+
} from "../chunk-2FAWAPRT.js";
|
|
24
24
|
import {
|
|
25
25
|
RunConfigSchema
|
|
26
|
-
} from "../chunk-
|
|
26
|
+
} from "../chunk-PVKV2O2E.js";
|
|
27
27
|
import {
|
|
28
28
|
HEADER_ACTOR_ID,
|
|
29
29
|
HEADER_ACTOR_QUERY,
|
|
@@ -34,13 +34,13 @@ import {
|
|
|
34
34
|
WS_PROTOCOL_TARGET,
|
|
35
35
|
WS_PROTOCOL_TRANSPORT,
|
|
36
36
|
assertUnreachable
|
|
37
|
-
} from "../chunk-
|
|
37
|
+
} from "../chunk-S6EAEZQA.js";
|
|
38
38
|
import {
|
|
39
39
|
getLogger
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-SFRRXLRM.js";
|
|
41
41
|
import {
|
|
42
42
|
promiseWithResolvers
|
|
43
|
-
} from "../chunk-
|
|
43
|
+
} from "../chunk-A6TV3QU6.js";
|
|
44
44
|
import {
|
|
45
45
|
INTERNAL_ERROR_CODE,
|
|
46
46
|
INTERNAL_ERROR_DESCRIPTION
|
|
@@ -1040,9 +1040,9 @@ function runActorScheduleTests(driverTestConfig) {
|
|
|
1040
1040
|
test4("executes c.schedule.at() with specific timestamp", async (c) => {
|
|
1041
1041
|
const { client } = await setupDriverTest(c, driverTestConfig);
|
|
1042
1042
|
const scheduled = client.scheduled.getOrCreate();
|
|
1043
|
-
const timestamp = Date.now() +
|
|
1043
|
+
const timestamp = Date.now() + 250;
|
|
1044
1044
|
await scheduled.scheduleTaskAt(timestamp);
|
|
1045
|
-
await waitFor(driverTestConfig,
|
|
1045
|
+
await waitFor(driverTestConfig, 500);
|
|
1046
1046
|
const lastRun = await scheduled.getLastRun();
|
|
1047
1047
|
const scheduledCount = await scheduled.getScheduledCount();
|
|
1048
1048
|
expect4(lastRun).toBeGreaterThan(0);
|
|
@@ -1051,39 +1051,27 @@ function runActorScheduleTests(driverTestConfig) {
|
|
|
1051
1051
|
test4("executes c.schedule.after() with delay", async (c) => {
|
|
1052
1052
|
const { client } = await setupDriverTest(c, driverTestConfig);
|
|
1053
1053
|
const scheduled = client.scheduled.getOrCreate();
|
|
1054
|
-
await scheduled.scheduleTaskAfter(
|
|
1055
|
-
await waitFor(driverTestConfig,
|
|
1054
|
+
await scheduled.scheduleTaskAfter(250);
|
|
1055
|
+
await waitFor(driverTestConfig, 500);
|
|
1056
1056
|
const lastRun = await scheduled.getLastRun();
|
|
1057
1057
|
const scheduledCount = await scheduled.getScheduledCount();
|
|
1058
1058
|
expect4(lastRun).toBeGreaterThan(0);
|
|
1059
1059
|
expect4(scheduledCount).toBe(1);
|
|
1060
1060
|
});
|
|
1061
|
-
test4("scheduled tasks persist across actor restarts", async (c) => {
|
|
1062
|
-
const { client } = await setupDriverTest(c, driverTestConfig);
|
|
1063
|
-
const scheduled = client.scheduled.getOrCreate();
|
|
1064
|
-
await scheduled.scheduleTaskAfter(200);
|
|
1065
|
-
await waitFor(driverTestConfig, 100);
|
|
1066
|
-
const newInstance = client.scheduled.getOrCreate();
|
|
1067
|
-
const initialCount = await newInstance.getScheduledCount();
|
|
1068
|
-
expect4(initialCount).toBe(0);
|
|
1069
|
-
await waitFor(driverTestConfig, 200);
|
|
1070
|
-
const scheduledCount = await newInstance.getScheduledCount();
|
|
1071
|
-
expect4(scheduledCount).toBe(1);
|
|
1072
|
-
});
|
|
1073
1061
|
test4("multiple scheduled tasks execute in order", async (c) => {
|
|
1074
1062
|
const { client } = await setupDriverTest(c, driverTestConfig);
|
|
1075
1063
|
const scheduled = client.scheduled.getOrCreate();
|
|
1076
1064
|
await scheduled.clearHistory();
|
|
1077
|
-
await scheduled.scheduleTaskAfterWithId("first",
|
|
1078
|
-
await scheduled.scheduleTaskAfterWithId("second",
|
|
1079
|
-
await scheduled.scheduleTaskAfterWithId("third",
|
|
1080
|
-
await waitFor(driverTestConfig,
|
|
1065
|
+
await scheduled.scheduleTaskAfterWithId("first", 250);
|
|
1066
|
+
await scheduled.scheduleTaskAfterWithId("second", 750);
|
|
1067
|
+
await scheduled.scheduleTaskAfterWithId("third", 1250);
|
|
1068
|
+
await waitFor(driverTestConfig, 500);
|
|
1081
1069
|
const history1 = await scheduled.getTaskHistory();
|
|
1082
1070
|
expect4(history1).toEqual(["first"]);
|
|
1083
|
-
await waitFor(driverTestConfig,
|
|
1071
|
+
await waitFor(driverTestConfig, 500);
|
|
1084
1072
|
const history2 = await scheduled.getTaskHistory();
|
|
1085
1073
|
expect4(history2).toEqual(["first", "second"]);
|
|
1086
|
-
await waitFor(driverTestConfig,
|
|
1074
|
+
await waitFor(driverTestConfig, 500);
|
|
1087
1075
|
const history3 = await scheduled.getTaskHistory();
|
|
1088
1076
|
expect4(history3).toEqual(["first", "second", "third"]);
|
|
1089
1077
|
});
|
|
@@ -1096,7 +1084,7 @@ function runActorScheduleTests(driverTestConfig) {
|
|
|
1096
1084
|
import { describe as describe5, expect as expect5, test as test5 } from "vitest";
|
|
1097
1085
|
|
|
1098
1086
|
// fixtures/driver-test-suite/sleep.ts
|
|
1099
|
-
var SLEEP_TIMEOUT =
|
|
1087
|
+
var SLEEP_TIMEOUT = 1e3;
|
|
1100
1088
|
var sleep = actor({
|
|
1101
1089
|
state: { startCount: 0, sleepCount: 0 },
|
|
1102
1090
|
onStart: (c) => {
|
|
@@ -1282,7 +1270,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1282
1270
|
expect5(startCount).toBe(1);
|
|
1283
1271
|
}
|
|
1284
1272
|
await sleepActor.triggerSleep();
|
|
1285
|
-
await waitFor(driverTestConfig,
|
|
1273
|
+
await waitFor(driverTestConfig, 250);
|
|
1286
1274
|
{
|
|
1287
1275
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1288
1276
|
expect5(sleepCount).toBe(1);
|
|
@@ -1299,7 +1287,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1299
1287
|
}
|
|
1300
1288
|
await sleepActor.triggerSleep();
|
|
1301
1289
|
await sleepActor.dispose();
|
|
1302
|
-
await waitFor(driverTestConfig,
|
|
1290
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1303
1291
|
const sleepActor2 = client.sleep.getOrCreate();
|
|
1304
1292
|
{
|
|
1305
1293
|
const { startCount, sleepCount } = await sleepActor2.getCounts();
|
|
@@ -1315,7 +1303,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1315
1303
|
expect5(sleepCount).toBe(0);
|
|
1316
1304
|
expect5(startCount).toBe(1);
|
|
1317
1305
|
}
|
|
1318
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1306
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1319
1307
|
{
|
|
1320
1308
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1321
1309
|
expect5(sleepCount).toBe(1);
|
|
@@ -1331,7 +1319,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1331
1319
|
expect5(startCount).toBe(1);
|
|
1332
1320
|
}
|
|
1333
1321
|
await sleepActor.dispose();
|
|
1334
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1322
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1335
1323
|
const sleepActor2 = client.sleep.getOrCreate();
|
|
1336
1324
|
{
|
|
1337
1325
|
const { startCount, sleepCount } = await sleepActor2.getCounts();
|
|
@@ -1347,19 +1335,19 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1347
1335
|
expect5(sleepCount).toBe(0);
|
|
1348
1336
|
expect5(startCount).toBe(1);
|
|
1349
1337
|
}
|
|
1350
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT -
|
|
1338
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT - 250);
|
|
1351
1339
|
{
|
|
1352
1340
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1353
1341
|
expect5(sleepCount).toBe(0);
|
|
1354
1342
|
expect5(startCount).toBe(1);
|
|
1355
1343
|
}
|
|
1356
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT -
|
|
1344
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT - 250);
|
|
1357
1345
|
{
|
|
1358
1346
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1359
1347
|
expect5(sleepCount).toBe(0);
|
|
1360
1348
|
expect5(startCount).toBe(1);
|
|
1361
1349
|
}
|
|
1362
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1350
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1363
1351
|
{
|
|
1364
1352
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1365
1353
|
expect5(sleepCount).toBe(1);
|
|
@@ -1374,8 +1362,8 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1374
1362
|
expect5(sleepCount).toBe(0);
|
|
1375
1363
|
expect5(startCount).toBe(1);
|
|
1376
1364
|
}
|
|
1377
|
-
await sleepActor.setAlarm(SLEEP_TIMEOUT -
|
|
1378
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1365
|
+
await sleepActor.setAlarm(SLEEP_TIMEOUT - 250);
|
|
1366
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1379
1367
|
{
|
|
1380
1368
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1381
1369
|
expect5(sleepCount).toBe(0);
|
|
@@ -1390,7 +1378,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1390
1378
|
expect5(sleepCount).toBe(0);
|
|
1391
1379
|
expect5(startCount).toBe(1);
|
|
1392
1380
|
}
|
|
1393
|
-
await sleepActor.setAlarm(SLEEP_TIMEOUT +
|
|
1381
|
+
await sleepActor.setAlarm(SLEEP_TIMEOUT + 250);
|
|
1394
1382
|
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 200);
|
|
1395
1383
|
{
|
|
1396
1384
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
@@ -1411,7 +1399,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1411
1399
|
);
|
|
1412
1400
|
const longRunningPromise = sleepActor.longRunningRpc();
|
|
1413
1401
|
await waitPromise;
|
|
1414
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1402
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1415
1403
|
await sleepActor.finishLongRunningRpc();
|
|
1416
1404
|
await longRunningPromise;
|
|
1417
1405
|
{
|
|
@@ -1420,7 +1408,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1420
1408
|
expect5(startCount).toBe(1);
|
|
1421
1409
|
}
|
|
1422
1410
|
await sleepActor.dispose();
|
|
1423
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1411
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1424
1412
|
const sleepActor2 = client.sleepWithLongRpc.getOrCreate();
|
|
1425
1413
|
{
|
|
1426
1414
|
const { startCount, sleepCount } = await sleepActor2.getCounts();
|
|
@@ -1452,7 +1440,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1452
1440
|
}
|
|
1453
1441
|
};
|
|
1454
1442
|
});
|
|
1455
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1443
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1456
1444
|
ws.send(JSON.stringify({ type: "getCounts" }));
|
|
1457
1445
|
const counts = await new Promise((resolve) => {
|
|
1458
1446
|
ws.onmessage = (event) => {
|
|
@@ -1465,7 +1453,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1465
1453
|
expect5(counts.sleepCount).toBe(0);
|
|
1466
1454
|
expect5(counts.startCount).toBe(1);
|
|
1467
1455
|
ws.close();
|
|
1468
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1456
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1469
1457
|
{
|
|
1470
1458
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1471
1459
|
expect5(sleepCount).toBe(1);
|
|
@@ -1483,7 +1471,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1483
1471
|
expect5(sleepCount).toBe(0);
|
|
1484
1472
|
expect5(startCount).toBe(1);
|
|
1485
1473
|
}
|
|
1486
|
-
const fetchDuration = SLEEP_TIMEOUT +
|
|
1474
|
+
const fetchDuration = SLEEP_TIMEOUT + 250;
|
|
1487
1475
|
const fetchPromise = sleepActor.fetch(
|
|
1488
1476
|
`long-request?duration=${fetchDuration}`
|
|
1489
1477
|
);
|
|
@@ -1496,7 +1484,7 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1496
1484
|
expect5(startCount).toBe(1);
|
|
1497
1485
|
expect5(requestCount).toBe(1);
|
|
1498
1486
|
}
|
|
1499
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1487
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1500
1488
|
{
|
|
1501
1489
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1502
1490
|
expect5(sleepCount).toBe(1);
|
|
@@ -1511,13 +1499,13 @@ function runActorSleepTests(driverTestConfig) {
|
|
|
1511
1499
|
expect5(sleepCount).toBe(0);
|
|
1512
1500
|
expect5(startCount).toBe(1);
|
|
1513
1501
|
}
|
|
1514
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1502
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1515
1503
|
{
|
|
1516
1504
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1517
1505
|
expect5(sleepCount).toBe(0);
|
|
1518
1506
|
expect5(startCount).toBe(1);
|
|
1519
1507
|
}
|
|
1520
|
-
await waitFor(driverTestConfig, SLEEP_TIMEOUT +
|
|
1508
|
+
await waitFor(driverTestConfig, SLEEP_TIMEOUT + 250);
|
|
1521
1509
|
{
|
|
1522
1510
|
const { startCount, sleepCount } = await sleepActor.getCounts();
|
|
1523
1511
|
expect5(sleepCount).toBe(0);
|
|
@@ -3870,16 +3858,18 @@ function runRequestAccessTests(driverTestConfig) {
|
|
|
3870
3858
|
|
|
3871
3859
|
// src/driver-test-suite/mod.ts
|
|
3872
3860
|
function runDriverTests(driverTestConfigPartial) {
|
|
3873
|
-
|
|
3861
|
+
var _a;
|
|
3862
|
+
const clientTypes = ((_a = driverTestConfigPartial.skip) == null ? void 0 : _a.inline) ? ["http"] : ["http", "inline"];
|
|
3863
|
+
for (const clientType of clientTypes) {
|
|
3874
3864
|
const driverTestConfig = {
|
|
3875
3865
|
...driverTestConfigPartial,
|
|
3876
3866
|
clientType
|
|
3877
3867
|
};
|
|
3878
3868
|
describe21(`client type (${clientType})`, () => {
|
|
3879
|
-
var
|
|
3869
|
+
var _a2;
|
|
3880
3870
|
runActorDriverTests(driverTestConfig);
|
|
3881
3871
|
runManagerDriverTests(driverTestConfig);
|
|
3882
|
-
const transports = ((
|
|
3872
|
+
const transports = ((_a2 = driverTestConfig.skip) == null ? void 0 : _a2.sse) ? ["websocket"] : ["websocket", "sse"];
|
|
3883
3873
|
for (const transport of transports) {
|
|
3884
3874
|
describe21(`transport (${transport})`, () => {
|
|
3885
3875
|
runActorConnTests({
|