diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-10-06 09:43:52 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-10-06 09:43:52 +0000 |
commit | 23e79b0aacc6ec1f7c7780364f5513af939b4298 (patch) | |
tree | 70000528c07d7b19bfeeb19c4f83a11f2768807e /src | |
parent | c5abd8afb8e12b6164902a16e7b5c6112b1f0f9e (diff) | |
download | gnunet-23e79b0aacc6ec1f7c7780364f5513af939b4298.tar.gz gnunet-23e79b0aacc6ec1f7c7780364f5513af939b4298.zip |
test case fixes...
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/gnunet-service-dht.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_multipeer_data.conf | 3 | ||||
-rwxr-xr-x | src/dht/test_dht_tools.sh | 4 | ||||
-rw-r--r-- | src/dht/test_dht_twopeer.c | 2 | ||||
-rw-r--r-- | src/dht/test_dht_twopeer_data.conf | 5 |
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 | |||
15 | HOSTNAME = localhost | 15 | HOSTNAME = localhost |
16 | PORT = 2100 | 16 | PORT = 2100 |
17 | 17 | ||
18 | [block] | ||
19 | plugins = test dht | ||
20 | |||
18 | [dhtcache] | 21 | [dhtcache] |
19 | QUOTA = 1000000 | 22 | QUOTA = 1000000 |
20 | DATABASE = sqlite | 23 | 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" | |||
42 | sleep 1 | 42 | sleep 1 |
43 | 43 | ||
44 | echo -n "TEST: Testing put..." | 44 | echo -n "TEST: Testing put..." |
45 | if ! $putexe -k testkey -d testdata > $out ; then | 45 | if ! $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..." | |||
56 | echo "Result 0, type 0:" > $checkout | 56 | echo "Result 0, type 0:" > $checkout |
57 | echo "testdata" >> $checkout | 57 | echo "testdata" >> $checkout |
58 | 58 | ||
59 | if ! $getexe -k testkey -T 1 > $out ; then | 59 | if ! $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 @@ | |||
2 | AUTOSTART = NO | 2 | AUTOSTART = NO |
3 | 3 | ||
4 | [dht] | 4 | [dht] |
5 | DEBUG = NO | 5 | DEBUG = YES |
6 | AUTOSTART = YES | 6 | AUTOSTART = YES |
7 | #PREFIX = xterm -T dht -e gdb --args | 7 | #PREFIX = xterm -T dht -e gdb --args |
8 | PORT = 2100 | 8 | PORT = 2100 |
9 | DISABLE_SOCKET_FORWARDING = YES | 9 | DISABLE_SOCKET_FORWARDING = YES |
10 | 10 | ||
11 | [block] | ||
12 | plugins = test dht | ||
13 | |||
11 | [dhtcache] | 14 | [dhtcache] |
12 | QUOTA = 1000000 | 15 | QUOTA = 1000000 |
13 | DATABASE = sqlite | 16 | DATABASE = sqlite |