gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet-scheme] 239/324: tests/network-size: Don't let the GC close port


From: gnunet
Subject: [gnunet-scheme] 239/324: tests/network-size: Don't let the GC close port.
Date: Tue, 21 Sep 2021 13:24:39 +0200

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

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

commit d43f4efb370bace64ca79b41202615d8159bc3c7
Author: Maxime Devos <maximedevos@telenet.be>
AuthorDate: Wed Sep 8 13:47:07 2021 +0200

    tests/network-size: Don't let the GC close port.
    
    This prevents a possible test failure.
    
    * tests/network-size.scm
      (protected-against-gc): New variable.
      ("Client calls call-back (and sets estimates) in-order")
      ("likewise, without 'updated' or 'connected' (issue 4)"):
      Set 'protected-against-gc'.
---
 tests/network-size.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/network-size.scm b/tests/network-size.scm
index 50be8e6..44e6be9 100644
--- a/tests/network-size.scm
+++ b/tests/network-size.scm
@@ -118,10 +118,15 @@
     ,(nse:estimate:standard-deviation estimate)
     ,(nse:estimate:timestamp estimate)))
 
+(define protected-against-gc)
+
 (test-equal "Client calls call-back (and sets estimates) in-order"
   (list %estimates %estimates)
   (call-with-services/fibers
    `(("nse" . ,(lambda (port spawn-fiber)
+                ;; Make sure that the GC doesn't cause buffered messages
+                ;; to be discarded.
+                (set! protected-against-gc port)
                 (act-as-the-server port spawn-fiber %estimates))))
    (lambda (config spawn-fiber)
      (define estimates/update/reverse '())
@@ -159,6 +164,7 @@
 (test-assert "likewise, without 'updated' or 'connected' (issue 4)"
   (call-with-services/fibers
    `(("nse" . ,(lambda (port spawn-fiber)
+                (set! protected-against-gc port)
                 (act-as-the-server port spawn-fiber %estimates))))
    (lambda (config spawn-fiber)
      (define server

-- 
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]