Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: speed up sync test in FAST_TESTS mode #729

Merged
merged 1 commit into from
Jul 30, 2024
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
3 changes: 2 additions & 1 deletion test-e2e/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import FakeTimers from '@sinonjs/fake-timers'
import Fastify from 'fastify'
import { map } from 'iterpal'
import {
FAST_TESTS,
connectPeers,
createManager,
createManagers,
Expand All @@ -34,7 +35,7 @@ import { kSyncState } from '../src/sync/sync-api.js'
const SCHEMAS_INITIAL_SYNC = ['preset', 'field']

test('Create and sync data', { timeout: 100_000 }, async (t) => {
const COUNT = 10
const COUNT = FAST_TESTS ? 5 : 10
const managers = await createManagers(COUNT, t)
const [invitor, ...invitees] = managers
const disconnect = connectPeers(managers, { discovery: false })
Expand Down
2 changes: 1 addition & 1 deletion test-e2e/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import fsPromises from 'node:fs/promises'
import { kSyncState } from '../src/sync/sync-api.js'
import { readConfig } from '../src/config-import.js'

const FAST_TESTS = !!process.env.FAST_TESTS
export const FAST_TESTS = !!process.env.FAST_TESTS
const projectMigrationsFolder = new URL('../drizzle/project', import.meta.url)
.pathname
const clientMigrationsFolder = new URL('../drizzle/client', import.meta.url)
Expand Down
Loading