diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/BUCK b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/BUCK index 5245ae526a..013115d374 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/BUCK +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/BUCK @@ -1,15 +1,7 @@ include_defs('//gerrit-acceptance-tests/tests.defs') -FLAKY_TEST_CASES=['ProjectWatchIT.java'] - acceptance_tests( group = 'server_project', - srcs = glob(['*IT.java'], excludes=FLAKY_TEST_CASES), + srcs = glob(['*IT.java']), labels = ['server'], ) - -acceptance_tests( - group = 'server_project_flaky', - srcs = FLAKY_TEST_CASES, - labels = ['server', 'flaky'], -) diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java index fd352d17b8..f33c22381b 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/server/project/ProjectWatchIT.java @@ -32,64 +32,6 @@ import java.util.List; @NoHttpd public class ProjectWatchIT extends AbstractDaemonTest { - /** - * Tests message project watches on new patch sets - *
- * As of 2015-06-21 this test is marked flaky for triggering race - * conditions between indexing and project watches filters as - * of 2015-06-21. - *
- * The test $SOMETIMES fails, stating that 2 emails instead of only - * 1 got sent. The root issue is the inserting of two patch sets - * (one shortly after the other), where the first patch set would - * not match a user's filter while the second one would. - *
- * The test basically: - *
The expected flow of actions for step 2+3 is: - *
- * (i) Write PS1 to the index - * (ii) Send out emails for PS1 after checking project watches from - * fresh ChangeData - * (iii) Write PS2 to the index - * (iv) Send out emails for PS2 after checking project watches from - * fresh ChangeData - *- *
- * But as step (ii) and step (iv) happen on separate threads, steps - * (ii) and (iii) might get turned around and become: - *
- * * Write PS1 to the index - * * Write PS2 to the index - * * Send out emails for PS1 after checking project watches from - * fresh ChangeData - * * Send out emails for PS2 after checking project watches from - * fresh ChangeData - *- *
- * Hence, the filters for project watches for the emails for PS1 query - * the index after PS2 has already been written there. Hence, the - * filters for PS1 use the commit message of PS2 when filtering on - * 'message:sekret'. - *
- * Since in the ProjectWatchIT test, PS2 contains 'sekret', the filters - * for sending out emails for PS1 see a commit message containing - * 'sekret', and the watches match for both PS1 and PS2, although they - * should only match for PS2. - *
- * This explains why the test is only failing sometimes, and also why it - * is more likely to occur when the system is under load. - *
- * A demo exposing the race condition is available at - * https://gerrit-review.googlesource.com/#/c/68719/1. - */ @Test public void newPatchSetsNotifyConfig() throws Exception { Address addr = new Address("Watcher", "watcher@example.com");