aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan S. Evans <evans@in.tum.de>2010-10-06 09:43:52 +0000
committerNathan S. Evans <evans@in.tum.de>2010-10-06 09:43:52 +0000
commit23e79b0aacc6ec1f7c7780364f5513af939b4298 (patch)
tree70000528c07d7b19bfeeb19c4f83a11f2768807e /src
parentc5abd8afb8e12b6164902a16e7b5c6112b1f0f9e (diff)
downloadgnunet-23e79b0aacc6ec1f7c7780364f5513af939b4298.tar.gz
gnunet-23e79b0aacc6ec1f7c7780364f5513af939b4298.zip
test case fixes...
Diffstat (limited to 'src')
-rw-r--r--src/dht/gnunet-service-dht.c2
-rw-r--r--src/dht/test_dht_multipeer_data.conf3
-rwxr-xr-xsrc/dht/test_dht_tools.sh4
-rw-r--r--src/dht/test_dht_twopeer.c2
-rw-r--r--src/dht/test_dht_twopeer_data.conf5
5 files changed, 11 insertions, 5 deletions
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,
4468 } 4468 }
4469 4469
4470 if (datacache != NULL) 4470 if (datacache != NULL)
4471 GNUNET_DATACACHE_put(datacache, &peer->hashPubKey, sizeof(struct GNUNET_PeerIdentity), (const char *)peer, 0, GNUNET_TIME_absolute_get_forever()); 4471 GNUNET_DATACACHE_put(datacache, &peer->hashPubKey, sizeof(struct GNUNET_PeerIdentity), (const char *)peer, GNUNET_BLOCK_TYPE_DHT_HELLO, GNUNET_TIME_absolute_get_forever());
4472 ret = try_add_peer(peer, 4472 ret = try_add_peer(peer,
4473 find_current_bucket(&peer->hashPubKey), 4473 find_current_bucket(&peer->hashPubKey),
4474 latency, 4474 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
15HOSTNAME = localhost 15HOSTNAME = localhost
16PORT = 2100 16PORT = 2100
17 17
18[block]
19plugins = test dht
20
18[dhtcache] 21[dhtcache]
19QUOTA = 1000000 22QUOTA = 1000000
20DATABASE = sqlite 23DATABASE = 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"
42sleep 1 42sleep 1
43 43
44echo -n "TEST: Testing put..." 44echo -n "TEST: Testing put..."
45if ! $putexe -k testkey -d testdata > $out ; then 45if ! $putexe -k testkey -d testdata -T 8 > $out ; then
46 echo "FAIL: error running $putexe" 46 echo "FAIL: error running $putexe"
47 echo "Command output was:" 47 echo "Command output was:"
48 cat $out 48 cat $out
@@ -56,7 +56,7 @@ echo -n "TEST: Testing get..."
56echo "Result 0, type 0:" > $checkout 56echo "Result 0, type 0:" > $checkout
57echo "testdata" >> $checkout 57echo "testdata" >> $checkout
58 58
59if ! $getexe -k testkey -T 1 > $out ; then 59if ! $getexe -k testkey -T 8 > $out ; then
60 echo "FAIL: error running $putexe" 60 echo "FAIL: error running $putexe"
61 echo "Command output was:" 61 echo "Command output was:"
62 cat $out 62 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)
251 251
252 get_context->get_handle = GNUNET_DHT_get_start(get_context->dht_handle, 252 get_context->get_handle = GNUNET_DHT_get_start(get_context->dht_handle,
253 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5), 253 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_SECONDS, 5),
254 0 /* fixme: real type */, 254 GNUNET_BLOCK_TYPE_DHT_HELLO,
255 &get_context->peer->hashPubKey, 255 &get_context->peer->hashPubKey,
256 GNUNET_DHT_RO_NONE, 256 GNUNET_DHT_RO_NONE,
257 NULL, 0, 257 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 @@
2AUTOSTART = NO 2AUTOSTART = NO
3 3
4[dht] 4[dht]
5DEBUG = NO 5DEBUG = YES
6AUTOSTART = YES 6AUTOSTART = YES
7#PREFIX = xterm -T dht -e gdb --args 7#PREFIX = xterm -T dht -e gdb --args
8PORT = 2100 8PORT = 2100
9DISABLE_SOCKET_FORWARDING = YES 9DISABLE_SOCKET_FORWARDING = YES
10 10
11[block]
12plugins = test dht
13
11[dhtcache] 14[dhtcache]
12QUOTA = 1000000 15QUOTA = 1000000
13DATABASE = sqlite 16DATABASE = sqlite