From: František Dvořák Date: Fri, 13 Nov 2009 19:55:11 +0000 (+0000) Subject: Update test script (cleanup only manually), tuning debug output. X-Git-Tag: glite-security-gss_R_2_0_1_1~7 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=5811f42f82becb0310c3e0b7c0b6af1bc8cce417;p=jra1mw.git Update test script (cleanup only manually), tuning debug output. --- diff --git a/org.glite.lb.harvester/examples/test.sh b/org.glite.lb.harvester/examples/test.sh index b6d5753..7105ee1 100755 --- a/org.glite.lb.harvester/examples/test.sh +++ b/org.glite.lb.harvester/examples/test.sh @@ -347,6 +347,22 @@ start_harvester() { } +cleanup_harvester() { + echo -n "cleaning up..." + X509_USER_KEY=${X509_USER_KEY} X509_USER_CERT=${X509_USER_CERT} \ + ${rtm} \ + -m $GLITE_RTM_TEST_DB \ + --cleanup \ + --debug 12 ${GLITE_RTM_TEST_ADDITIONAL_ARGS} >`pwd`/RTM/glite-rtm-test-cleanup.log 2>&1 + if [ x"$?" != x"0" ]; then + cat `pwd`/RTM/glite-rtm-test-cleanup.log + echo FAILED + return 1 + fi + echo -n "OK " +} + + kill_daemons() { pid1=`cat ${GLITE_LB_TEST_PIDFILE} 2>/dev/null` [ -f "${GLITE_RTM_TEST_PIDFILE}" ] && pid2=`cat ${GLITE_RTM_TEST_PIDFILE}` @@ -606,6 +622,14 @@ test_cleanup() { return 0 fi + echo -n "$n_notifs notifications..." + my_get "SELECT notifid FROM notif_registrations" || return 1 + if [ "$lines" != "$n_notifs" ]; then + echo "FAIL" + return 0 + fi + + cleanup_harvester || return $? echo -n "0 notifications..." my_get "SELECT notifid FROM notif_registrations" || return 1 if [ "$lines" != "0" ]; then diff --git a/org.glite.lb.harvester/src/harvester.c b/org.glite.lb.harvester/src/harvester.c index 6945ee3..7af1b5e 100644 --- a/org.glite.lb.harvester/src/harvester.c +++ b/org.glite.lb.harvester/src/harvester.c @@ -1644,7 +1644,7 @@ void *notify_thread(void *thread_data) { i--; continue; } - lprintf(t, INF, "bound %d. notification '%s' (%s)", i, notif->id_str, rtm_notiftype2str(notif->type)); + lprintf(t, INF, "bound %d. notification '%s' (%s), valid: %s", i, notif->id_str, rtm_notiftype2str(notif->type), time2str(t, notif->valid)); rtm_update_error_state(t, notif, i, 0); // no bootstrap here, reliable delivery will send changes updated = 1; @@ -1994,6 +1994,7 @@ int config_preload(int argn, char *argv[]) { if (INF <= config.debug) { lprintf(NULL, INF, "threads: %d", config.nthreads); + lprintf(NULL, INF, "notifs ttl: %d", config.ttl); lprintf(NULL, INF, "historic dive: %d", config.dive); if (config.dbcs) { lprintf(NULL, INF, "database storage: '%s'", config.dbcs);