Skip to content

Commit

Permalink
Increase wait times in integration tests for improved stability
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Joseph Petro committed Dec 22, 2024
1 parent bc1a793 commit 6d33c6c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions smart-clusters/test/source_clusters.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ async function create_integration_env() {
if (!fs.existsSync(testContentDir)) {
if(fs.existsSync('test/test_content.js')) {
execSync('node test/test_content.js');
await new Promise(resolve => setTimeout(resolve, 1000));
await new Promise(resolve => setTimeout(resolve, 2000));
} else {
throw new Error(
`Missing test_content.js script. ` +
Expand Down Expand Up @@ -133,8 +133,9 @@ test.before(async (t) => {
});

test.after(async (t) => {
await new Promise(resolve => setTimeout(resolve, 2000)); // wait for final saves to ensure complete cleanup (should be removed in future)
// Cleanup if you wish, or keep the data for debugging
fs.rmdirSync(path.join(process.cwd(), 'test', 'test-content'), { recursive: true });
fs.rmdirSync(path.join(process.cwd(), 'test', 'test-content'), { recursive: true, force: true });
});

test.serial("Integration: Sources loaded with embeddings, able to cluster", async (t) => {
Expand Down

0 comments on commit 6d33c6c

Please sign in to comment.