3 # Run a simple backup of the Bacula build directory and see
4 # if bacula is respecting the maximum concurrent job (MJC)
14 # Zap out any schedule in default conf file so that
15 # it doesn't start during our test
18 echo "s% Schedule =%# Schedule =%g" >${outf}
19 cp $scripts/bacula-dir.conf $tmp/1
20 sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf
22 change_jobname BackupClient1 $JobName
25 cat <<END_OF_DATA >$tmp/bconcmds
29 label volume=TestVolume001 storage=File1 pool=File slot=1 drive=0
31 setbandwidth limit="100 kb/s" client
32 run job=$JobName level=full yes
36 run job=$JobName level=full comment="Should be waiting for Maximum Concurrent Job" yes
39 @# The following reload command is causing a bug with the current code
42 run job=$JobName level=full comment="Should be waiting for Maximum Concurrent Job" yes
45 @# ##################################################################################
46 @# If everything is alright, we should find two jobs waiting for MaximumConcurrentJob
47 @# ##################################################################################
49 @# ##################################################################################
51 setbandwidth limit="10000000 kb/s" client
58 restore where=$tmp/bacula-restores select all done
66 check_for_zombie_jobs storage=File1
72 nb=$(grep "is waiting" $tmp/log3.out | wc -l)
73 if [ $nb -ne 2 ]; then
74 print_debug "ERROR: Should find two jobs in $tmp/log3.out waiting for Maximum Concurrent Jobs, got $nb"