Skip to content

Commit b98a193

Browse files
Add await to close test. Test CI command optimisation.
1 parent a3ea29b commit b98a193

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/test-simulators.yaml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,26 +90,22 @@ jobs:
9090
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
9191
script: echo "Generated AVD snapshot for caching."
9292

93+
- name: Android Emulator Build
94+
working-directory: ./tools/powersynctests
95+
run: pnpx detox build --configuration android.emu.release
96+
9397
- name: Run connected Android tests
9498
uses: ReactiveCircus/android-emulator-runner@v2.28.0
9599
with:
96100
api-level: 31
97101
target: google_apis
98102
arch: x86_64
99103
avd-name: $AVD_NAME
100-
script: cd tools/powersynctests && pnpm android
104+
script: cd tools/powersynctests && pnpx detox test --configuration android.emu.release --headless
101105
force-avd-creation: false
102106
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
103107
disable-animations: true
104108

105-
- name: Android Emulator Build
106-
working-directory: ./tools/powersynctests
107-
run: pnpx detox build --configuration android.emu.release
108-
109-
- name: Android Emultator Test
110-
working-directory: ./tools/powersynctests
111-
run: pnpx detox test --configuration android.emu.release --headless
112-
113109
test-ios:
114110
name: Test iOS
115111
runs-on: macOS-15

tools/powersynctests/src/tests/queries.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,7 @@ export function registerBaseTests() {
585585
}
586586

587587
await db.executeBatch(statement, bulkInsertCommands);
588-
db.close();
588+
await db.close();
589589

590590
for (let i = 1; i < 10; i++) {
591591
db = createDatabase();
@@ -603,7 +603,7 @@ export function registerBaseTests() {
603603
db.execute(`SELECT * FROM t1 `)
604604
];
605605

606-
db.close();
606+
await db.close();
607607

608608
const results = await Promise.allSettled(tests);
609609
expect(results.map((r) => r.status)).deep.equal(Array(tests.length).fill('rejected'));

0 commit comments

Comments
 (0)