[pkg-go] Bug#982665: golang-github-hashicorp-memberlist: Please increase the timeout for TestMemberlist_SendTo

Logan Rosen logan at ubuntu.com
Sat Feb 13 03:26:01 GMT 2021


Package: golang-github-hashicorp-memberlist
Version: 0.2.2-1
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu hirsute ubuntu-patch

Hi,

TestMemberlist_SendTo fails in Ubuntu's autopkgtest infrastructure
because of a timing issue; the messages don't arrive within 3
milliseconds, so we increased the timeout to 12 milliseconds, which
seems to work reliably.

Can you please consider making the same change in Debian?

In Ubuntu, the attached patch was applied to achieve the following:

    - d/p/fix-TestMemberlist_SendTo.patch: due to a timing issue this test fails
      in Ubuntu autopkgtest infrastructure. Wait more time to let messages
      arrive before checking for them.

Thanks for considering the patch.

Logan
-------------- next part --------------
diff -Nru golang-github-hashicorp-memberlist-0.2.2/debian/patches/fix-TestMemberlist_SendTo.patch golang-github-hashicorp-memberlist-0.2.2/debian/patches/fix-TestMemberlist_SendTo.patch
--- golang-github-hashicorp-memberlist-0.2.2/debian/patches/fix-TestMemberlist_SendTo.patch	1969-12-31 19:00:00.000000000 -0500
+++ golang-github-hashicorp-memberlist-0.2.2/debian/patches/fix-TestMemberlist_SendTo.patch	2020-07-09 10:29:42.000000000 -0400
@@ -0,0 +1,19 @@
+Description: Fix TestMemberlist_SendTo in Ubuntu autopkgtest env
+ For some reason there is a timing issue where it needs to wait more time than
+ in Debian to receive the messages sent. From my tests 12 milliseconds seems
+ enough.
+Author: Lucas Kanashiro <kanashiro at ubuntu.com>
+Forwarded: not-needed
+Last-Updated: 2020-07-08
+
+--- a/memberlist_test.go
++++ b/memberlist_test.go
+@@ -1062,7 +1062,7 @@
+ 	}
+ 
+ 	// Wait for a little while
+-	time.Sleep(3 * time.Millisecond)
++	time.Sleep(12 * time.Millisecond)
+ 
+ 	msgs1 := d1.getMessages()
+ 	msgs2 := d2.getMessages()
diff -Nru golang-github-hashicorp-memberlist-0.2.2/debian/patches/series golang-github-hashicorp-memberlist-0.2.2/debian/patches/series
--- golang-github-hashicorp-memberlist-0.2.2/debian/patches/series	2019-10-23 11:17:10.000000000 -0400
+++ golang-github-hashicorp-memberlist-0.2.2/debian/patches/series	2020-10-06 11:16:25.000000000 -0400
@@ -1,2 +1,3 @@
 01-Vendor-sean--seed.patch
 test--skip_TestShuffleNodes.patch
+fix-TestMemberlist_SendTo.patch


More information about the Pkg-go-maintainers mailing list