Rerun flaky tests 3 times

This can help to reduce time spent on rebuilds caused by flaky tests.

Change-Id: I8f7831e470fd8aa065f0b8728f62f39734d05016
diff --git a/.bazelrc b/.bazelrc
index 8c32661..e6c3dc6 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -30,6 +30,7 @@
 
 test --build_tests_only
 test --test_output=errors
+test --flaky_test_attempts=3
 
 import %workspace%/tools/remote-bazelrc
 
diff --git a/pom.xml b/pom.xml
index 0ea089e..4ed91ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -282,6 +282,7 @@
             <forkCount>${test-fork-count}</forkCount>
             <reuseForks>true</reuseForks>
             <argLine>@{argLine}</argLine>
+            <rerunFailingTestsCount>3</rerunFailingTestsCount>
           </configuration>
         </plugin>