Skip to content

Increase NLTK test timeout to fix flaky test - #1218

Open
tnikolova82 wants to merge 1 commit into
masterfrom
fix-nltk-test-timeout
Open

Increase NLTK test timeout to fix flaky test#1218
tnikolova82 wants to merge 1 commit into
masterfrom
fix-nltk-test-timeout

Conversation

@tnikolova82

Copy link
Copy Markdown
Contributor

Summary

  • Increase the NLTK corpus test timeout from 10s (default) to 30s
  • The NLTK corpus loading on first request can take longer than 10s, causing intermittent test failures
  • Also fixes import ordering to follow Go conventions (stdlib first, then external packages)

Problem

The NLTK integration test (when pushing an app that uses nltk corpus / deploys successfully) occasionally times out because corpus data loading on the first HTTP request can exceed the default 10-second Eventually timeout.

Solution

Use Gomega's per-assertion timeout override: Eventually(deployment, 30*time.Second).Should(...)

This is a targeted fix that only affects the NLTK test without changing the global timeout for other tests.

The NLTK corpus test can take longer than the default 10s timeout on first
request when loading corpus data. Increase to 30s to prevent intermittent
failures.
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