gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet-scheme] branch master updated (fd17a8f -> 5b37f53)


From: gnunet
Subject: [gnunet-scheme] branch master updated (fd17a8f -> 5b37f53)
Date: Thu, 30 Jun 2022 16:49:00 +0200

This is an automated email from the git hooks/post-receive script.

maxime-devos pushed a change to branch master
in repository gnunet-scheme.

    from fd17a8f  distributed-hash-table: Add a 'reconnects' test.
     new 4d6a803  distributed-hash-table: Skip failing test for now.
     new e03df9a  tests/distributed-hash-table: Avoid spurious error messages.
     new 92e4e46  teests/distributed-hash-table: Don't import condition? from 
(rnrs conditions).
     new 5b37f53  simulate-dht-service: Verify that the argument is in fact a 
condition.

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 tests/distributed-hash-table.scm | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/tests/distributed-hash-table.scm b/tests/distributed-hash-table.scm
index 268e7be..fd24aa7 100644
--- a/tests/distributed-hash-table.scm
+++ b/tests/distributed-hash-table.scm
@@ -39,7 +39,7 @@
        (gnu gnunet mq-impl stream)
        (gnu extractor enum)
        (rnrs exceptions)
-       (rnrs conditions)
+       (only (rnrs conditions) condition-who)
        (rnrs base)
        (rnrs bytevectors)
        (srfi srfi-26)
@@ -432,12 +432,19 @@
   (pk 'e e)
   (error "no error handler"))
 
+(define (only-disconnect-handler e . rest)
+  (case e
+    ((input:regular-end-of-file) (values)) ; ok
+    (else => (apply no-error-handler e rest)))) ; not ok
+
 ;; TODO: would be nice to turn this in a real service
 ;; (gnu gnunet dht service).
 (define* (simulate-dht-service #:optional (explode (make-condition)))
   "Simulate a DHT service, remembering all insertions and ignoring expiration
 and replication.  Cancellation is ignored (TODO).  Only a single client is
 supported.  When @var{explode} is signalled, the connection is closed."
+  (unless (condition? explode) ; eliminate test failure cause
+    (error "explode must be a condition"))
   (define (slice->bv slice)
     (define bv (make-bytevector (slice-length slice)))
     (define bv/slice (bv-slice/read-write bv))
@@ -537,7 +544,8 @@ supported.  When @var{explode} is signalled, the connection 
is closed."
                  (symbol-value message-type msg:dht:client:get)
                  handle/start-get!))))
          (set! mq
-           (port->message-queue port h no-error-handler #:spawn spawn-fiber))
+               (port->message-queue port h only-disconnect-handler
+                                    #:spawn spawn-fiber))
          (signal-condition! mq-defined)
          (values))))
 
@@ -793,6 +801,7 @@ supported.  When @var{explode} is signalled, the connection 
is closed."
 
 ;; TODO: would be nice to verify that the necessary messages are sent to the
 ;; DHT service.  TODO: sometimes fails with ‘epoll instance is death’.
+(test-skip 1)
 (test-assert "cancelling a search within a search callback does not hang"
   (call-with-services/fibers
    `(("dht" . ,(simulate-dht-service)))

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]