@@ -1396,14 +1396,6 @@ func (r *tester) prepareScenario(ctx context.Context, config *testConfig, stackC
13961396 return hits .size () > 0 , nil
13971397 }, 1 * time .Second , waitForDataTimeout )
13981398
1399- // Get deprecation warnings after ensuring that there are ingested docs and thus the
1400- // data stream exists.
1401- scenario .deprecationWarnings , err = r .getDeprecationWarnings (ctx , scenario .dataStream )
1402- if err != nil {
1403- return nil , fmt .Errorf ("failed to get deprecation warnings for data stream %s: %w" , scenario .dataStream , err )
1404- }
1405- logger .Debugf ("Found %d deprecation warnings for data stream %s" , len (scenario .deprecationWarnings ), scenario .dataStream )
1406-
14071399 if service != nil && config .Service != "" && ! config .IgnoreServiceError {
14081400 exited , code , err := service .ExitCode (ctx , config .Service )
14091401 if err != nil && ! errors .Is (err , servicedeployer .ErrNotSupported ) {
@@ -1422,6 +1414,14 @@ func (r *tester) prepareScenario(ctx context.Context, config *testConfig, stackC
14221414 return nil , testrunner.ErrTestCaseFailed {Reason : fmt .Sprintf ("could not find hits in %s data stream" , scenario .dataStream )}
14231415 }
14241416
1417+ // Get deprecation warnings after ensuring that there are ingested docs and thus the
1418+ // data stream exists.
1419+ scenario .deprecationWarnings , err = r .getDeprecationWarnings (ctx , scenario .dataStream )
1420+ if err != nil {
1421+ return nil , fmt .Errorf ("failed to get deprecation warnings for data stream %s: %w" , scenario .dataStream , err )
1422+ }
1423+ logger .Debugf ("Found %d deprecation warnings for data stream %s" , len (scenario .deprecationWarnings ), scenario .dataStream )
1424+
14251425 logger .Debugf ("Check whether or not synthetic source mode is enabled (data stream %s)..." , scenario .dataStream )
14261426 scenario .syntheticEnabled , err = isSyntheticSourceModeEnabled (ctx , r .esAPI , scenario .dataStream )
14271427 if err != nil {
0 commit comments