|
93 | 93 | import static org.hamcrest.Matchers.sameInstance; |
94 | 94 | import static org.hamcrest.Matchers.startsWith; |
95 | 95 |
|
| 96 | +@TestLogging(reason = "these tests do a lot of log-worthy things but we usually don't care", value = "org.elasticsearch:FATAL") |
96 | 97 | public class CoordinatorTests extends AbstractCoordinatorTestCase { |
97 | 98 |
|
98 | 99 | /** |
@@ -1478,6 +1479,10 @@ public void testNodeCannotJoinIfJoinValidationFailsOnMaster() { |
1478 | 1479 | } |
1479 | 1480 | } |
1480 | 1481 |
|
| 1482 | + @TestLogging( |
| 1483 | + reason = "test includes assertions about Coordinator and JoinHelper logging", |
| 1484 | + value = "org.elasticsearch.cluster.coordination.Coordinator:WARN,org.elasticsearch.cluster.coordination.JoinHelper:INFO" |
| 1485 | + ) |
1481 | 1486 | public void testNodeCannotJoinIfJoinPingValidationFailsOnMaster() throws IllegalAccessException { |
1482 | 1487 | try (Cluster cluster = new Cluster(randomIntBetween(1, 3))) { |
1483 | 1488 | cluster.runRandomly(); |
@@ -1578,6 +1583,10 @@ public void testClusterCannotFormWithFailingJoinValidation() { |
1578 | 1583 | } |
1579 | 1584 | } |
1580 | 1585 |
|
| 1586 | + @TestLogging( |
| 1587 | + reason = "test includes assertions about JoinHelper logging", |
| 1588 | + value = "org.elasticsearch.cluster.coordination.JoinHelper:INFO" |
| 1589 | + ) |
1581 | 1590 | public void testCannotJoinClusterWithDifferentUUID() throws IllegalAccessException { |
1582 | 1591 | try (Cluster cluster1 = new Cluster(randomIntBetween(1, 3))) { |
1583 | 1592 | cluster1.runRandomly(); |
@@ -1854,6 +1863,10 @@ public void testClusterRecoversAfterExceptionDuringSerialization() { |
1854 | 1863 | } |
1855 | 1864 | } |
1856 | 1865 |
|
| 1866 | + @TestLogging( |
| 1867 | + reason = "testing ClusterFormationFailureHelper logging", |
| 1868 | + value = "org.elasticsearch.cluster.coordination.ClusterFormationFailureHelper:WARN" |
| 1869 | + ) |
1857 | 1870 | public void testLogsWarningPeriodicallyIfClusterNotFormed() throws IllegalAccessException { |
1858 | 1871 | final long warningDelayMillis; |
1859 | 1872 | final Settings settings; |
@@ -1948,7 +1961,11 @@ public void assertMatched() { |
1948 | 1961 | } |
1949 | 1962 | } |
1950 | 1963 |
|
1951 | | - @TestLogging(reason = "testing debug logging of LagDetector", value = "org.elasticsearch.cluster.coordination.LagDetector:DEBUG") |
| 1964 | + @TestLogging( |
| 1965 | + reason = "testing LagDetector and CoordinatorPublication logging", |
| 1966 | + value = "org.elasticsearch.cluster.coordination.LagDetector:DEBUG," |
| 1967 | + + "org.elasticsearch.cluster.coordination.Coordinator.CoordinatorPublication:INFO" |
| 1968 | + ) |
1952 | 1969 | public void testLogsMessagesIfPublicationDelayed() throws IllegalAccessException { |
1953 | 1970 | try (Cluster cluster = new Cluster(between(3, 5))) { |
1954 | 1971 | cluster.runRandomly(); |
|
0 commit comments