From 5af14f4e1c94cb4e672d190f17cafa0d3392ae32 Mon Sep 17 00:00:00 2001 From: Andrea Selva Date: Fri, 10 Nov 2023 11:01:42 +0100 Subject: [PATCH] Fixed functional test in case the LS_JAVA_HOME is configured (#15535) Adds filtering on Logstash output message in an integration tests when setting LS_JAVA_HOME environment variable. --- qa/integration/specs/command_line_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qa/integration/specs/command_line_spec.rb b/qa/integration/specs/command_line_spec.rb index 5e5aa9b8b65..4ccfaea0aa4 100644 --- a/qa/integration/specs/command_line_spec.rb +++ b/qa/integration/specs/command_line_spec.rb @@ -39,7 +39,7 @@ execute = @logstash.run lines = execute.stderr_and_stdout.split("\n") expect(lines.shift).to match(/^(Using system java)|(Using bundled JDK)|(Using LS_JAVA_HOME defined java):/) - while (up_line = lines.shift).match(/OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated|warning: ignoring JAVA_TOOL_OPTIONS|warning: already initialized constant Socket::Constants|.*warning: method redefined; discarding old to_int$|.*warning: method redefined; discarding old to_f$/) do end + while (up_line = lines.shift).match(/OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated|warning: ignoring JAVA_TOOL_OPTIONS|warning: already initialized constant Socket::Constants|.*warning: method redefined; discarding old to_int$|.*warning: method redefined; discarding old to_f$|^WARNING: Logstash comes bundled with the recommended JDK.*/) do end expect(up_line).to match(/^Sending Logstash logs to/) end end