File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
server/src/test/java/org/elasticsearch/cluster/metadata Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -273,7 +273,7 @@ public void testXContentSerializationWithRolloverAndEffectiveRetention() throws
273273 Settings settings = null ;
274274 CompressedXContent mappings = null ;
275275 Map <String , AliasMetadata > aliases = null ;
276- ResettableValue < DataStreamOptions .Template > dataStreamOptions = ResettableValue . undefined () ;
276+ DataStreamOptions .Template dataStreamOptions = null ;
277277 if (randomBoolean ()) {
278278 settings = randomSettings ();
279279 }
@@ -284,7 +284,8 @@ public void testXContentSerializationWithRolloverAndEffectiveRetention() throws
284284 aliases = randomAliases ();
285285 }
286286 if (randomBoolean ()) {
287- dataStreamOptions = randomDataStreamOptionsTemplate ();
287+ // Do not set random lifecycle to avoid having data_retention and effective_retention in the response.
288+ dataStreamOptions = new DataStreamOptions .Template (new DataStreamFailureStore .Template (randomBoolean (), null ));
288289 }
289290 DataStreamLifecycle .Template lifecycle = DataStreamLifecycle .Template .DEFAULT ;
290291 ComponentTemplate template = new ComponentTemplate (
Original file line number Diff line number Diff line change @@ -221,7 +221,7 @@ public void testXContentSerializationWithRolloverAndEffectiveRetention() throws
221221 Settings settings = null ;
222222 CompressedXContent mappings = null ;
223223 Map <String , AliasMetadata > aliases = null ;
224- ResettableValue < DataStreamOptions .Template > dataStreamOptions = ResettableValue . undefined () ;
224+ DataStreamOptions .Template dataStreamOptions = null ;
225225 ComposableIndexTemplate .DataStreamTemplate dataStreamTemplate = randomDataStreamTemplate ();
226226 if (randomBoolean ()) {
227227 settings = randomSettings ();
@@ -233,7 +233,8 @@ public void testXContentSerializationWithRolloverAndEffectiveRetention() throws
233233 aliases = randomAliases ();
234234 }
235235 if (randomBoolean ()) {
236- dataStreamOptions = ComponentTemplateTests .randomDataStreamOptionsTemplate ();
236+ // Do not set random lifecycle to avoid having data_retention and effective_retention in the response.
237+ dataStreamOptions = new DataStreamOptions .Template (new DataStreamFailureStore .Template (randomBoolean (), null ));
237238 }
238239 // We use the empty lifecycle so the global retention can be in effect
239240 DataStreamLifecycle .Template lifecycle = DataStreamLifecycle .Template .DEFAULT ;
You can’t perform that action at this time.
0 commit comments