File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
elasticsearch-api/api-spec-testing/test_file Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,17 @@ def execute(client, test = nil)
112
112
begin
113
113
@response = client . send ( _method , prepare_arguments ( args , test ) )
114
114
rescue Elastic ::Transport ::Transport ::Errors ::BadRequest => e
115
- raise e unless e . message . match 'resource_already_exists_exception'
116
-
117
- client . delete ( index : args [ 'index' ] )
115
+ case e . message
116
+ when /resource_already_exists_exception/
117
+ client . delete ( index : args [ 'index' ] )
118
+ when /failed to parse date field/
119
+ body = args [ 'body' ]
120
+ time_series = body [ 'settings' ] [ 'index' ] [ 'time_series' ]
121
+ time_series . each { |k , v | time_series [ k ] = v . strftime ( "%FT%TZ" ) }
122
+ args [ 'body' ] = body
123
+ else
124
+ raise e
125
+ end
118
126
@response = client . send ( _method , prepare_arguments ( args , test ) )
119
127
end
120
128
client
You can’t perform that action at this time.
0 commit comments