From: Nathan S. Evans Date: Wed, 6 Oct 2010 09:43:52 +0000 (+0000) Subject: test case fixes... X-Git-Tag: initial-import-from-subversion-38251~20163 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=23e79b0aacc6ec1f7c7780364f5513af939b4298;p=oweals%2Fgnunet.git test case fixes... --- diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index fb93cef6e..8dbb11525 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c @@ -4468,7 +4468,7 @@ void handle_core_connect (void *cls, } if (datacache != NULL) - GNUNET_DATACACHE_put(datacache, &peer->hashPubKey, sizeof(struct GNUNET_PeerIdentity), (const char *)peer, 0, GNUNET_TIME_absolute_get_forever()); + GNUNET_DATACACHE_put(datacache, &peer->hashPubKey, sizeof(struct GNUNET_PeerIdentity), (const char *)peer, GNUNET_BLOCK_TYPE_DHT_HELLO, GNUNET_TIME_absolute_get_forever()); ret = try_add_peer(peer, find_current_bucket(&peer->hashPubKey), latency, diff --git a/src/dht/test_dht_multipeer_data.conf b/src/dht/test_dht_multipeer_data.conf index be8578e8a..17ebedbbd 100644 --- a/src/dht/test_dht_multipeer_data.conf +++ b/src/dht/test_dht_multipeer_data.conf @@ -15,6 +15,9 @@ HOME = $SERVICEHOME HOSTNAME = localhost PORT = 2100 +[block] +plugins = test dht + [dhtcache] QUOTA = 1000000 DATABASE = sqlite diff --git a/src/dht/test_dht_tools.sh b/src/dht/test_dht_tools.sh index 035107997..b22084ebb 100755 --- a/src/dht/test_dht_tools.sh +++ b/src/dht/test_dht_tools.sh @@ -42,7 +42,7 @@ echo "PASS" sleep 1 echo -n "TEST: Testing put..." -if ! $putexe -k testkey -d testdata > $out ; then +if ! $putexe -k testkey -d testdata -T 8 > $out ; then echo "FAIL: error running $putexe" echo "Command output was:" cat $out @@ -56,7 +56,7 @@ echo -n "TEST: Testing get..." echo "Result 0, type 0:" > $checkout echo "testdata" >> $checkout -if ! $getexe -k testkey -T 1 > $out ; then +if ! $getexe -k testkey -T 8 > $out ; then echo "FAIL: error running $putexe" echo "Command output was:" cat $out diff --git a/src/dht/test_dht_twopeer.c b/src/dht/test_dht_twopeer.c index 51ba9ceb3..b9f95eb51 100644 --- a/src/dht/test_dht_twopeer.c +++ b/src/dht/test_dht_twopeer.c @@ -251,7 +251,7 @@ do_get (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) get_context->get_handle = GNUNET_DHT_get_start(get_context->dht_handle, GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5), - 0 /* fixme: real type */, + GNUNET_BLOCK_TYPE_DHT_HELLO, &get_context->peer->hashPubKey, GNUNET_DHT_RO_NONE, NULL, 0, diff --git a/src/dht/test_dht_twopeer_data.conf b/src/dht/test_dht_twopeer_data.conf index 06ad96212..ea90b3c00 100644 --- a/src/dht/test_dht_twopeer_data.conf +++ b/src/dht/test_dht_twopeer_data.conf @@ -2,12 +2,15 @@ AUTOSTART = NO [dht] -DEBUG = NO +DEBUG = YES AUTOSTART = YES #PREFIX = xterm -T dht -e gdb --args PORT = 2100 DISABLE_SOCKET_FORWARDING = YES +[block] +plugins = test dht + [dhtcache] QUOTA = 1000000 DATABASE = sqlite