diff --git a/elasticsearch-api/test/integration/yaml_test_runner.rb b/elasticsearch-api/test/integration/yaml_test_runner.rb
index <HASH>..<HASH> 100644
--- a/elasticsearch-api/test/integration/yaml_test_runner.rb
+++ b/elasticsearch-api/test/integration/yaml_test_runner.rb
@@ -331,7 +331,13 @@ suites.each do |suite|
 
     files = Dir[suite.join('*.{yml,yaml}')]
     files.each do |file|
-      tests = YAML.load_documents File.new(file)
+      begin
+        tests = YAML.load_documents File.new(file)
+      rescue Exception => e
+        $stderr.puts "ERROR [#{e.class}] while loading [#{file}] file".ansi(:red)
+        # raise e
+        next
+      end
 
       # Extract setup actions
       setup_actions = tests.select { |t| t['setup'] }.first['setup'] rescue []
[API] Update the YAML test runner

When the YAML parser encountered an incorrect syntax in one of the YAML files
in the REST test suite, the whole test run failed.

This patch prevents the failure, and prints the path to the offending file to STDERR.

Related: <URL>