google-nomulus/javatests/google/registry
shicong c8aa6005f2 Use reflection to inject the attempt number
This CL is to address the public static field in RepeatableRunner
for caller to get the current attempt number. We tried to have
a JUnit TestRule to achieve the purpose but it ended up with having
a RuleChain in each class where we already have multiple rules and
need to add the retry rule. This is because we have to make sure
the retry rule is the last one to wrap the test statement so that
the actual retry can include the actions defined in other rules.
Having a rule chain is not scalable and confuses engineer so we
gave it up.

Instead, we decided to expand the current RepeatableRunner to
use reflection to inject the attempt number to the test class.
Doing it this way can reduce the burden from the caller and it also
gets rid of the global state from the previous public static field.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=240789045
2019-03-29 16:17:35 -04:00
..
backup Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
batch Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
beam Coalesce null to the empty string in the Spec11 pipeline 2019-03-29 16:07:54 -04:00
bigquery Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
builddefs Fix .bzl files with buildifier 2019-02-25 11:13:08 -05:00
config Configure client id and client secret in the config file 2018-12-05 16:04:08 -05:00
cron Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
dns Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
export Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
flows Consolidate domain_info_fee xml test files 2019-03-29 16:06:09 -04:00
groups Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
keyring Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
mapreduce/inputs Merge DomainResource into DomainBase 2019-01-28 15:57:10 -05:00
model Validate provided email addresses when creating a Registrar 2019-03-29 16:14:22 -04:00
module Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
monitoring/whitebox Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
pricing Clean up third_party imports in BUILD files 2018-07-14 01:11:51 -04:00
proxy Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
rdap Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
rde Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
reporting Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
request Check registrar existence prior to verifying access 2019-03-29 16:11:10 -04:00
security Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
server Remove the web console EPP endpoint 2019-03-05 14:20:42 -05:00
storage/drive Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
testing Consolidate the domain_renew_fee xml test files 2019-03-29 15:53:03 -04:00
tldconfig/idn Remove the use of InjectRule in IdnLabelValidatorTest 2018-10-22 18:54:53 -04:00
tmch Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
tools Validate provided email addresses when creating a Registrar 2019-03-29 16:14:22 -04:00
ui Validate provided email addresses when creating a Registrar 2019-03-29 16:14:22 -04:00
util Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
webdriver Use reflection to inject the attempt number 2019-03-29 16:17:35 -04:00
whois Allow third_party/java_src/gtld/ to use :mockito2_for_third_party 2019-03-20 14:25:28 -04:00
xjc Clean up internal imports in BUILD files 2018-07-14 01:37:03 -04:00
xml Fix some issues caught by IntelliJ static code analysis 2019-01-28 16:08:24 -05:00