Skip to content

Commit

Permalink
Remove deprecation log file check in 6.8 (#67465)
Browse files Browse the repository at this point in the history
This test has been muted for a very long time, yet the underlying cause
is still unknown, but it only occurs in 6.8. This commit removes the
failing portion of the test so that we have some coverage.

closes #35990
  • Loading branch information
rjernst authored Jan 15, 2021
1 parent 2f07e90 commit dab5822
Showing 1 changed file with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,6 @@ public void testDeprecationLoggerMaybeLog() throws IOException, UserException {
}
}

@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/35990")
public void testDeprecatedSettings() throws IOException, UserException {
setupLogging("settings");

Expand All @@ -266,21 +265,9 @@ public void testDeprecatedSettings() throws IOException, UserException {
assertSettingDeprecationsAndWarnings(new Setting<?>[]{setting});
}

final String deprecationPath =
System.getProperty("es.logs.base_path") +
System.getProperty("file.separator") +
System.getProperty("es.logs.cluster_name") +
"_deprecation.log";
final List<String> deprecationEvents = Files.readAllLines(PathUtils.get(deprecationPath));
if (iterations > 0) {
assertThat(deprecationEvents.size(), equalTo(1));
assertLogLine(
deprecationEvents.get(0),
Level.WARN,
"org.elasticsearch.common.logging.DeprecationLogger.deprecated",
"\\[deprecated.foo\\] setting was deprecated in Elasticsearch and will be removed in a future release! " +
"See the breaking changes documentation for the next major version.");
}
// We SHOULD check the log message actually made it to the deprecation log (and we do
// in newer branches), but on 6.8 it is somehow possible the log is not flushed.
// See https://github.com/elastic/elasticsearch/issues/35990
}

public void testFindAppender() throws IOException, UserException {
Expand Down

0 comments on commit dab5822

Please sign in to comment.