Skip to content

Commit 7d15bbe

Browse files
committed
test(playwright): fix local test server config for SQLite runs
1 parent da70622 commit 7d15bbe

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/playwright/start-nextcloud-server.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ async function start() {
5151
process.stdout.write('\nApply custom configuration for Playwright tests\n')
5252
await runOcc(['config:system:set', 'appstoreenabled', '--value', 'false', '--type', 'boolean'])
5353
process.stdout.write('├─ Disabled app store\n')
54+
// createRandomUser() generates short passwords that the policy would reject
55+
await runOcc(['app:disable', 'password_policy'])
56+
process.stdout.write('├─ Disabled password policy for random test users\n')
57+
// PDO::ATTR_TIMEOUT (2) = SQLite busy timeout in seconds; without it parallel
58+
// workers hit "database is locked" 500s on write collisions
59+
await runOcc(['config:system:set', 'dbdriveroptions', '2', '--value', '5', '--type', 'integer'])
60+
process.stdout.write('├─ Set SQLite busy timeout for parallel workers\n')
5461
await runExec(['php', '-r', '$db = new SQLite3("data/owncloud.db");$db->busyTimeout(5000);$db->exec("PRAGMA journal_mode = wal;");'])
5562
process.stdout.write('├─ Enabled SQLite WAL mode for better performance\n')
5663
process.stdout.write('├─ Initialize cron job...\n')

0 commit comments

Comments
 (0)