@@ -383,16 +383,22 @@ function test_resume_is_blocked() {
383383function test_src_db_table_dropped_during_import() {
384384 (
385385 # Given
386+ # create tables
386387 local src_tbl=foo dst_tbl=bar start_timestamp=$( date ' +%Y/%m/%d %H:%M:%S' )
387388 fixture_src_tbl_and_dst_tbl_have_same_schema $src_tbl $dst_tbl > /dev/null
388- # 30 seconds to give db time to flush logs
389+
390+ # set tunables
391+ # the 30 second sleep gives the db time to flush logs reflecting the table drop
389392 set_src_tunable ' comdb2_files_sleep_secs_after_processing_llmeta 30'
390393 set_src_tunable ' logmsg level debug'
391394
395+ # teardown routines
392396 trap " set_src_tunable 'comdb2_files_sleep_secs_after_processing_llmeta 0';
393397 set_src_tunable 'logmsg level warn';
394398 query_dst_db 'drop table $dst_tbl '" EXIT
395399
400+ # start import and wait for the source db to sleep after
401+ # sending llmeta to the dst db
396402 query_dst_db " replace table $dst_tbl with LOCAL_$SRC_DBNAME .$src_tbl " 2> err.txt &
397403 waitpid=$!
398404 wait_for_src_trace " just processed llmeta" " $start_timestamp "
@@ -435,16 +441,23 @@ function test_src_db_table_dropped_during_import() {
435441function test_src_db_election_during_import() {
436442 (
437443 # Given
444+ # create tables
438445 local src_tbl=foo dst_tbl=bar start_timestamp=$( date ' +%Y/%m/%d %H:%M:%S' )
439446 fixture_src_tbl_and_dst_tbl_have_same_schema $src_tbl $dst_tbl > /dev/null
447+
448+ # set tunables
440449 set_src_tunable ' comdb2_files_sleep_secs_after_processing_llmeta 10'
441450 set_src_tunable ' logmsg level debug'
442451
452+ # teardown routines
443453 trap " set_src_tunable 'comdb2_files_sleep_secs_after_processing_llmeta 0';
444454 set_src_tunable 'logmsg level warn';
445455 query_src_db 'drop table $src_tbl ';
446456 query_dst_db 'drop table $dst_tbl '" EXIT
447457
458+
459+ # start import and wait for the source db to sleep after
460+ # sending llmeta to the dst db
448461 query_dst_db " replace table $dst_tbl with LOCAL_$SRC_DBNAME .$src_tbl " &
449462 waitpid=$!
450463 wait_for_src_trace " just processed llmeta" " $start_timestamp "
0 commit comments