Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add granular configuration for retrying wait time in test #470

Merged
merged 2 commits into from
May 23, 2024

Conversation

omochi
Copy link
Contributor

@omochi omochi commented May 22, 2024

以下でCIがこけました
#469 (comment)

おそらくタイミング問題で、サーバが立ち上がっていなかっただけなので、
待ってからリトライすれば直ります。

ここで、最初の待ち時間は短くして、
失敗しとの待ち時間は長くしたいです。

そこで既存の withRetry を改善して指定できるようにします。

var attempt = 0
while true {
try await Task.sleep(for: delay)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sleepの場所を組み替えて、
最初と、リトライ時の2つに分けます。

@@ -41,12 +41,16 @@ final class FrontendDevServerTests: XCTestCase {
defer {
devServer.signal(SIGINT)
}
try await Task.sleep(for: .seconds(3))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

最初に3秒まつ処理を withRetry でやります。

@omochi omochi changed the title [2/2] リトライの待ち時間をより細かく設定できるようにする リトライの待ち時間をより細かく設定できるようにする May 22, 2024
@kateinoigakukun kateinoigakukun changed the title リトライの待ち時間をより細かく設定できるようにする Add granular configuration for retrying wait time May 23, 2024
@kateinoigakukun kateinoigakukun changed the title Add granular configuration for retrying wait time Add granular configuration for retrying wait time in test May 23, 2024
@kateinoigakukun kateinoigakukun merged commit 59730f9 into swiftwasm:main May 23, 2024
4 checks passed
@omochi omochi deleted the retry-interval branch May 23, 2024 06:27
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.

None yet

2 participants