|
28 | 28 | public class FollowIndexIT extends ESCCRRestTestCase {
|
29 | 29 |
|
30 | 30 | public void testDowngradeRemoteClusterToBasic() throws Exception {
|
31 |
| - assumeFalse("windows is the worst", Constants.WINDOWS); |
32 | 31 | if ("follow".equals(targetCluster) == false) {
|
33 | 32 | return;
|
34 | 33 | }
|
@@ -78,27 +77,30 @@ public void testDowngradeRemoteClusterToBasic() throws Exception {
|
78 | 77 | assertThat(indexExists(index2), is(false));
|
79 | 78 |
|
80 | 79 | // parse the logs and ensure that the auto-coordinator skipped coordination on the leader cluster
|
81 |
| - assertBusy(() -> { |
82 |
| - final List<String> lines = Files.readAllLines(PathUtils.get(System.getProperty("log"))); |
83 |
| - final Iterator<String> it = lines.iterator(); |
84 |
| - boolean warn = false; |
85 |
| - while (it.hasNext()) { |
86 |
| - final String line = it.next(); |
87 |
| - if (line.matches(".*\\[WARN\\s*\\]\\[o\\.e\\.x\\.c\\.a\\.AutoFollowCoordinator\\s*\\] \\[node-0\\] " + |
88 |
| - "failure occurred while fetching cluster state for auto follow pattern \\[test_pattern\\]")) { |
89 |
| - warn = true; |
90 |
| - break; |
| 80 | + // (does not work on windows...) |
| 81 | + if (Constants.WINDOWS == false) { |
| 82 | + assertBusy(() -> { |
| 83 | + final List<String> lines = Files.readAllLines(PathUtils.get(System.getProperty("log"))); |
| 84 | + final Iterator<String> it = lines.iterator(); |
| 85 | + boolean warn = false; |
| 86 | + while (it.hasNext()) { |
| 87 | + final String line = it.next(); |
| 88 | + if (line.matches(".*\\[WARN\\s*\\]\\[o\\.e\\.x\\.c\\.a\\.AutoFollowCoordinator\\s*\\] \\[node-0\\] " + |
| 89 | + "failure occurred while fetching cluster state for auto follow pattern \\[test_pattern\\]")) { |
| 90 | + warn = true; |
| 91 | + break; |
| 92 | + } |
91 | 93 | }
|
92 |
| - } |
93 |
| - assertTrue(warn); |
94 |
| - assertTrue(it.hasNext()); |
95 |
| - final String lineAfterWarn = it.next(); |
96 |
| - assertThat( |
97 |
| - lineAfterWarn, |
98 |
| - equalTo("org.elasticsearch.ElasticsearchStatusException: " + |
99 |
| - "can not fetch remote cluster state as the remote cluster [leader_cluster] is not licensed for [ccr]; " + |
100 |
| - "the license mode [BASIC] on cluster [leader_cluster] does not enable [ccr]")); |
101 |
| - }); |
| 94 | + assertTrue(warn); |
| 95 | + assertTrue(it.hasNext()); |
| 96 | + final String lineAfterWarn = it.next(); |
| 97 | + assertThat( |
| 98 | + lineAfterWarn, |
| 99 | + equalTo("org.elasticsearch.ElasticsearchStatusException: " + |
| 100 | + "can not fetch remote cluster state as the remote cluster [leader_cluster] is not licensed for [ccr]; " + |
| 101 | + "the license mode [BASIC] on cluster [leader_cluster] does not enable [ccr]")); |
| 102 | + }); |
| 103 | + } |
102 | 104 | });
|
103 | 105 |
|
104 | 106 | // Manually following index2 also does not work after the downgrade:
|
|
0 commit comments