Skip to content

Remove beforeAll() global index cleanup from "semantic search" test#20

Merged
austin-denoble merged 1 commit intomainfrom
adenoble/tweak-semanticSearch-test
Dec 23, 2025
Merged

Remove beforeAll() global index cleanup from "semantic search" test#20
austin-denoble merged 1 commit intomainfrom
adenoble/tweak-semanticSearch-test

Conversation

@austin-denoble
Copy link
Copy Markdown
Contributor

@austin-denoble austin-denoble commented Dec 23, 2025

Problem

The semantic search integration test had a beforeAll() hook which was listing and cleaning up all indexes within whatever API key was set. This is error-prone, and a little surprising and destructive if you're testing with a key while not expecting that to happen.

It's also caused flakiness in the external app test in the typescript SDK repo.

Solution

Remove the beforeAll() hook. The afterAll() hook is cleaning up any indexes that were loaded/created as a part of the test anyways.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Infrastructure change (CI configs, etc)
  • Non-code change (docs, etc)
  • None of the above: (explain here)

Test Plan

n/a

@github-actions
Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 100%) 330 / 330
🔵 Statements 100% (🎯 100%) 330 / 330
🔵 Functions 100% (🎯 100%) 18 / 18
🔵 Branches 100% (🎯 100%) 33 / 33
File CoverageNo changed files found.
Generated in workflow #36 for commit 931a40c by the Vitest Coverage Report Action

@austin-denoble austin-denoble changed the title get rid of global index cleanup in beforeAll for Semantic Search example Remove beforeAll() global index cleanup from "semantic search" test Dec 23, 2025
@austin-denoble austin-denoble merged commit 22b2aa8 into main Dec 23, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant