1- use crate :: common:: { InstallArgs , RecipeData } ;
1+ use crate :: common:: { Args , RecipeData } ;
22use crate :: {
33 common:: { config, nrql, test:: retry} ,
44 linux:: { self , bash:: exec_bash_command, install:: install_agent_control_from_recipe, service} ,
55} ;
66use std:: { fs, time:: Duration } ;
77use tracing:: { debug, info} ;
88
9- pub fn test_migration ( args : InstallArgs ) {
9+ pub fn test_migration ( args : Args ) {
1010 let test_id = format ! (
1111 "onhost-e2e-infra-agent_{}" ,
1212 chrono:: Local :: now( ) . format( "%Y-%m-%d_%H-%M-%S" )
@@ -22,9 +22,7 @@ pub fn test_migration(args: InstallArgs) {
2222 info ! ( nrql = nrql_query, "Checking results of NRQL" ) ;
2323 let retries = 12 ;
2424 retry ( retries, Duration :: from_secs ( 10 ) , "nrql assertion" , || {
25- retry ( retries, Duration :: from_secs ( 10 ) , "nrql assertion" , || {
26- nrql:: check_query_results_are_not_empty ( & args, & nrql_query)
27- } )
25+ nrql:: check_query_results_are_not_empty ( & args, & nrql_query)
2826 } )
2927 . unwrap_or_else ( |err| {
3028 panic ! ( "query '{nrql_query}' failed after {retries} retries: {err}" ) ;
@@ -54,16 +52,14 @@ pub fn test_migration(args: InstallArgs) {
5452 info ! ( nrql = nrql_query, "Checking results of NRQL" ) ;
5553 let retries = 12 ;
5654 retry ( retries, Duration :: from_secs ( 10 ) , "nrql assertion" , || {
57- retry ( retries, Duration :: from_secs ( 10 ) , "nrql assertion" , || {
58- nrql:: check_query_results_are_not_empty ( & recipe_data. args , & nrql_query)
59- } )
55+ nrql:: check_query_results_are_not_empty ( & recipe_data. args , & nrql_query)
6056 } )
6157 . unwrap_or_else ( |err| {
6258 panic ! ( "query '{nrql_query}' failed after {retries} retries: {err}" ) ;
6359 } ) ;
6460}
6561
66- fn install_and_setup_infra_agent_with_mysql ( args : & InstallArgs , test_id : & str ) {
62+ fn install_and_setup_infra_agent_with_mysql ( args : & Args , test_id : & str ) {
6763 // Install infra agent
6864 let install_command = format ! (
6965 r#"
0 commit comments