-trying to fix test shutdown sequence if database not setup
authorChristian Grothoff <christian@grothoff.org>
Tue, 24 Apr 2012 11:50:15 +0000 (11:50 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 24 Apr 2012 11:50:15 +0000 (11:50 +0000)
src/datastore/test_datastore_api.c

index 25836ca663065cb6169fc0eb7b1feab0e37ffbe9..f6945ed2ec522de1e2aa65b1bbd9eff3ddb6916b 100644 (file)
@@ -462,12 +462,14 @@ run_tests (void *cls, int32_t success, struct GNUNET_TIME_Absolute min_expiratio
     return;
   case GNUNET_NO:
     FPRINTF (stderr, "%s", "Test 'put' operation failed, key already exists (!?)\n");
+    GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES);
     GNUNET_free (crc);
     return;
   case GNUNET_SYSERR:
     FPRINTF (stderr,
              "Test 'put' operation failed with error `%s' database likely not setup, skipping test.\n",
              msg);
+    GNUNET_DATASTORE_disconnect (datastore, GNUNET_YES);
     GNUNET_free (crc);
     return;
   default: