package Ġcom . mal in sk iy . mar athon . execution . strategy . impl . retry . fixed quota Ċ Ċ import Ġcom . fasterxml . jackson . annotation . JsonProperty Ċ import Ġcom . mal in sk iy . mar athon . device . Device Pool Id Ċ import Ġcom . mal in sk iy . mar athon . execution . TestResult Ċ import Ġcom . mal in sk iy . mar athon . execution . Test Shard Ċ import Ġcom . mal in sk iy . mar athon . execution . strategy . Retry Strategy Ċ Ċ class ĠFixed Quota Retry Strategy (@ JsonProperty (" total Allowed Retry Quota ") Ġtotal Allowed Retry Quota : ĠInt Ġ= Ġ 2 0 0 , ĊĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠĠ Ġ@ JsonProperty (" retry Per Test Quota ") Ġretry Per Test Quota : ĠInt Ġ= Ġ 3 ) Ġ: ĠRetry Strategy Ġ{ ĊĠĠĠ Ġprivate Ġval Ġretry Watch dog Ġ= ĠRetry Watch dog ( total Allowed Retry Quota , Ġretry Per Test Quota ) ĊĠĠĠ Ġprivate Ġval Ġpool TestCase Failure Accumulator Ġ= ĠPool Test Failure Accumulator () ĊĊĠĠĠ Ġoverride Ġfun Ġprocess ( device Pool Id : ĠDevice Pool Id , Ġtests : ĠCollection < TestResult >, Ġtest Shard : ĠTest Shard ): ĠList < TestResult > Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġtests . filter Ġ{ Ġtest Result Ġ-> ĊĠĠĠĠĠĠĠĠĠĠĠ Ġpool TestCase Failure Accumulator . record ( device Pool Id , Ġtest Result . test Ġ) ĊĠĠĠĠĠĠĠĠĠĠĠ Ġval Ġfl ak iness Result Count Ġ= Ġtest Shard . fl aky Tests . count Ġ{ Ġit Ġ== Ġtest Result . test Ġ} ĊĠĠĠĠĠĠĠĠĠĠĠ Ġretry Watch dog . request Retry ( pool TestCase Failure Accumulator . getCount ( device Pool Id , Ġtest Result . test ) Ġ+ Ġfl ak iness Result Count ) ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun Ġequals ( other : ĠAny ?): ĠBoolean Ġ{ ĊĠĠĠĠĠĠĠ Ġif Ġ( this Ġ=== Ġother ) Ġreturn Ġtrue ĊĠĠĠĠĠĠĠ Ġif Ġ( java Class Ġ!= Ġother ?. java Class ) Ġreturn Ġfalse ĊĊĠĠĠĠĠĠĠ Ġother Ġas ĠFixed Quota Retry Strategy ĊĊĠĠĠĠĠĠĠ Ġif Ġ( retry Watch dog Ġ!= Ġother . retry Watch dog ) Ġreturn Ġfalse ĊĊĠĠĠĠĠĠĠ Ġreturn Ġtrue ĊĠĠĠ Ġ} ĊĊĠĠĠ Ġoverride Ġfun ĠhashCode (): ĠInt Ġ{ ĊĠĠĠĠĠĠĠ Ġreturn Ġretry Watch dog . hashCode () ĊĠĠĠ Ġ} Ċ } Ċ