refactor: transform test suite to industry-benchmark quality#116
Open
Debanitrkl wants to merge 2 commits intoparseablehq:mainfrom
Open
refactor: transform test suite to industry-benchmark quality#116Debanitrkl wants to merge 2 commits intoparseablehq:mainfrom
Debanitrkl wants to merge 2 commits intoparseablehq:mainfrom
Conversation
Replace hardcoded sleeps with polling (WaitForIngest/WaitForQueryable), guarantee cleanup via ResourceTracker + t.Cleanup, use UniqueStream for collision-free test names, add t.Helper() to all ~70 utilities, fix race conditions, and add health gate via TestMain. Key changes: - quest_utils.go (NEW): TestMain, WaitForIngest, UniqueStream, ResourceTracker, RunFlogAuto - model.go: Add NewSampleJsonWithFields/NewSampleJsonBatch data factories - test_utils.go: t.Helper() on all funcs, fix ConcurrentMultiStreamIngest race - usecase_test.go (NEW): All 13 use case tests with polling, ResourceTracker, unique names - quest_test.go: Replace 14x time.Sleep(120s), merge dependent test pairs, fix logic bug (err != nil → err == nil), add t.Parallel() to stateless tests Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove TrackCorrelation, correlation payloads, CRUD utilities, TestSmokeCorrelationLifecycle, TestUseCase_CorrelationAcrossDifferentSchemas, and correlation steps from UC5. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
quest_utils.go: TestMain health gate,WaitForIngest/WaitForQueryablepolling helpers,UniqueStreamfor collision-free names,ResourceTracker(LIFO cleanup viat.Cleanup),RunFlogAuto, and response assertion helperstime.Sleep(120s)inquest_test.gowithWaitForIngest(2s poll interval, 180s timeout) — tests finish as soon as data is ready instead of always waiting 2 minutesusecase_test.go) rewritten withUniqueStream,WaitForIngest,ResourceTracker, andRunFlogAutot.Helper()to all ~70 utility functions intest_utils.gofor accurate failure line reportingConcurrentMultiStreamIngest(nil response dereference)TestSmokeListLogStream(err != nil→err == nil)SetRetention+GetRetention→RetentionLifecycle; removedSetAlert+GetAlertsuperseded byAlertLifecycle)t.Parallel()to 16 stateless read-only testsNewSampleJsonWithFields,NewSampleJsonBatch) tomodel.goTest plan
go vet ./...passes with zero errors (verified locally)time.Sleep(120in active code inquest_test.goSleep()calls inusecase_test.goResourceTrackerfor guaranteed cleanup-raceflag to verify race condition fix inConcurrentMultiStreamIngest🤖 Generated with Claude Code