Update test script (cleanup only manually), tuning debug output.
authorFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 13 Nov 2009 19:55:11 +0000 (19:55 +0000)
committerFrantišek Dvořák <valtri@civ.zcu.cz>
Fri, 13 Nov 2009 19:55:11 +0000 (19:55 +0000)
org.glite.lb.harvester/examples/test.sh
org.glite.lb.harvester/src/harvester.c

index b6d5753..7105ee1 100755 (executable)
@@ -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
index 6945ee3..7af1b5e 100644 (file)
@@ -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);