Conversation
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.
目的
セッション作成の応答が遅延・喪失した場合、既存の20秒単位の再試行で、既に作成されたセッションに対して再びPOSTする可能性がありました。ブラウザの起動が重なるCIで重複生成や所有できないセッションを避けるための任意APIです。
変更と互換性
new_session (retry => 0, ...)の場合だけ、アプリケーションレベルのセッション作成POSTを1回にします。従来の全体上限180秒で結果を待ち、失敗時は接続を中断してエラーを返します。既定値・retry => 1は従来どおりです。capabilities、成功後のセッション所有・終了処理は維持します。応答を失いIDが不明なセッションを推測してDELETEすることはありません。そのようなセッションの回収は、呼出側が管理するdriverサーバ/コンテナの清掃が必要です。HTTP層の送信前接続回復まで一律に無効化するAPIではありません。
検証
macOS / Perl 5.42.2で
t/new-session-retry.tの7条件・57検査が成功。遅延、通常、通信失敗、protocol error、全体期限、既定値、明示的な有効化を確認しました。実際のConnectionメソッドを呼び、HTTP応答と時計部分を制御したテストです。実ブラウザを今回の単体テストで起動したという意味ではありません。PODの空の見出しも補い、構文検査が成功しました。依存準備後:
./prove t/new-session-retry.t。その他の依存は既存のPerl依存環境を利用。fresh install・上流全テストは未実施です。