Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/e2e-1c1d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-1c3d.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
7 changes: 7 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ module.exports = {
roots: ['<rootDir>/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',
Expand Down
9 changes: 7 additions & 2 deletions tests/e2e/Redirection.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]],
};

Expand Down
Loading