From 8b9a1ed01011f43140f759380b4daaa5949d6402 Mon Sep 17 00:00:00 2001 From: Haonan Date: Fri, 26 Jun 2026 10:06:04 +0800 Subject: [PATCH 1/4] Update branch names for E2E tests workflow --- .github/workflows/e2e-1c1d.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-1c1d.yml b/.github/workflows/e2e-1c1d.yml index 5f01d42..2cb20be 100644 --- a/.github/workflows/e2e-1c1d.yml +++ b/.github/workflows/e2e-1c1d.yml @@ -2,9 +2,9 @@ name: E2E Tests (1C1D) on: push: - branches: [ main, dev/* ] + branches: [ develop, dev/* ] pull_request: - branches: [ main ] + branches: [ develop ] jobs: e2e-1c1d: From 7c84565c4eaee4b63de68860fc140dd60c4447cc Mon Sep 17 00:00:00 2001 From: Haonan Date: Fri, 26 Jun 2026 10:06:33 +0800 Subject: [PATCH 2/4] Update branch names for E2E tests workflow --- .github/workflows/e2e-1c3d.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e-1c3d.yml b/.github/workflows/e2e-1c3d.yml index d2bfd81..8c336e7 100644 --- a/.github/workflows/e2e-1c3d.yml +++ b/.github/workflows/e2e-1c3d.yml @@ -2,9 +2,9 @@ name: E2E Tests (1C3D) on: push: - branches: [ main, dev/* ] + branches: [ develop, dev/* ] pull_request: - branches: [ main ] + branches: [ develop ] jobs: e2e-1c3d: From 43c9c2b18867efa3ca27fa32a226e8e895ec68f9 Mon Sep 17 00:00:00 2001 From: CritasWang Date: Fri, 26 Jun 2026 10:42:33 +0800 Subject: [PATCH 3/4] Fix jest ESM transform for uuid@13 (thrift 0.23 dependency) thrift@0.23 added a dependency on uuid@13, which is ESM-only (type: "module"). The default ts-jest setup ignores node_modules and loads it as CommonJS, causing 'Unexpected token export' and all e2e suites failing to load. Allow .js transforms and stop ignoring uuid so it is compiled to CommonJS. --- jest.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jest.config.js b/jest.config.js index 7c61c56..5be6d6c 100644 --- a/jest.config.js +++ b/jest.config.js @@ -4,6 +4,13 @@ module.exports = { roots: ['/tests'], testMatch: ['**/*.test.ts'], moduleFileExtensions: ['ts', 'js', 'json'], + // thrift@0.23 pulls in uuid@13, which ships ESM-only (type: "module"). + // ts-jest must compile it to CommonJS, so allow .js transforms and stop + // ignoring the uuid package under node_modules. + transform: { + '^.+\\.[tj]s$': ['ts-jest', { tsconfig: { allowJs: true } }], + }, + transformIgnorePatterns: ['/node_modules/(?!uuid/)'], collectCoverageFrom: [ 'src/**/*.ts', '!src/**/*.d.ts', From 24656254e57735d04b56b4a86ebc79ddeba13c71 Mon Sep 17 00:00:00 2001 From: CritasWang Date: Fri, 26 Jun 2026 10:50:56 +0800 Subject: [PATCH 4/4] Fix flaky redirection test by spacing device timestamps The multi-device redirection test wrote all five devices with a bare Date.now() timestamp. In a 3-node cluster the fast write loop could assign the same millisecond to two devices; tree-model SELECT aligns rows by timestamp, merging the colliding rows so the query returned 4 rows and the >= 5 assertion failed. Offset each timestamp by its loop index so every device gets a distinct timestamp. --- tests/e2e/Redirection.test.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/e2e/Redirection.test.ts b/tests/e2e/Redirection.test.ts index e9a41a6..5a4dccb 100644 --- a/tests/e2e/Redirection.test.ts +++ b/tests/e2e/Redirection.test.ts @@ -156,12 +156,17 @@ describe("Redirection E2E Tests", () => { "root.test_redirect.device5", ]; - for (const deviceId of devices) { + const baseTime = Date.now(); + for (const [index, deviceId] of devices.entries()) { const tablet = { deviceId, measurements: ["temperature", "humidity"], dataTypes: [TSDataType.FLOAT, TSDataType.FLOAT], - timestamps: [Date.now()], + // Offset each device's timestamp so the fast write loop cannot + // assign the same millisecond to two devices. Tree-model queries + // align rows by timestamp, so colliding timestamps would merge + // rows and make the row count fall short of the device count. + timestamps: [baseTime + index], values: [[25.5 + Math.random() * 5, 60.0 + Math.random() * 10]], };