From e0af5821030ca775d217c741936df2bb504bf55c Mon Sep 17 00:00:00 2001 From: linonetwo Date: Tue, 5 May 2026 00:50:59 +0800 Subject: [PATCH] fix(e2e): more file cycles in smoke test for sustained-load measurement MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Single create/modify/delete only captures first-launch watcher latency (6.4s), but main test watcher degrades 3-10× under multi-scenario load. Add second file cycle to measure performance after sustained watcher use. --- features/smoke.feature | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/features/smoke.feature b/features/smoke.feature index d96c5b65..c4465e46 100644 --- a/features/smoke.feature +++ b/features/smoke.feature @@ -29,18 +29,35 @@ Feature: TidGi Application Launch When I click on a "default wiki workspace button" element with selector "div[data-testid^='workspace-']:has-text('wiki')" Then the browser view should be loaded and visible And I wait for SSE and watch-fs to be ready - # Stress-test the watcher with actual file operations - # This exercises the full watch-fs pipeline: detect → load → sync + # Stress-test the watcher with repeated file operations + # Running multiple create/modify/delete cycles captures watcher + # performance degradation that occurs in the full test suite When I create file "{tmpDir}/wiki/tiddlers/CalibrationProbe.tid" with content: """ created: 20250226070000000 modified: 20250226070000000 title: CalibrationProbe - Probe content for calibration measurement + Initial probe content """ Then I wait for tiddler "CalibrationProbe" to be added by watch-fs - When I modify file "{tmpDir}/wiki/tiddlers/CalibrationProbe.tid" to contain "Modified probe content" + When I modify file "{tmpDir}/wiki/tiddlers/CalibrationProbe.tid" to contain "Modified probe content v1" + Then I wait for tiddler "CalibrationProbe" to be updated by watch-fs + When I modify file "{tmpDir}/wiki/tiddlers/CalibrationProbe.tid" to contain "Modified probe content v2" Then I wait for tiddler "CalibrationProbe" to be updated by watch-fs When I delete file "{tmpDir}/wiki/tiddlers/CalibrationProbe.tid" Then I wait for tiddler "CalibrationProbe" to be deleted by watch-fs + # Second file cycle — measures performance under sustained watcher load + When I create file "{tmpDir}/wiki/tiddlers/CalibrationProbe2.tid" with content: + """ + created: 20250226070000000 + modified: 20250226070000000 + title: CalibrationProbe2 + + Second probe content + """ + Then I wait for tiddler "CalibrationProbe2" to be added by watch-fs + When I modify file "{tmpDir}/wiki/tiddlers/CalibrationProbe2.tid" to contain "Modified probe2 content" + Then I wait for tiddler "CalibrationProbe2" to be updated by watch-fs + When I delete file "{tmpDir}/wiki/tiddlers/CalibrationProbe2.tid" + Then I wait for tiddler "CalibrationProbe2" to be deleted by watch-fs