File: 0008-fix-flaky-ExampleHandlerSOAP.patch

package info (click to toggle)
golang-github-vmware-govmomi 0.24.2-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 11,848 kB
  • sloc: sh: 2,285; lisp: 1,560; ruby: 948; xml: 139; makefile: 54
file content (16 lines) | stat: -rw-r--r-- 827 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: Mathias Gibbens <gibmat@debian.org>
Description: Somewhere there's a race condition between setting up the manager and logging in. Adding a small sleep seems to paper over that for now. Due to the version of this library in Debian being so out of date, I haven't created an issue upstream.
Forwarded: not-needed
diff --git a/session/keepalive/example_test.go b/session/keepalive/example_test.go
index cf6b865..221fe15 100644
--- a/session/keepalive/example_test.go
+++ b/session/keepalive/example_test.go
@@ -44,6 +44,8 @@ func ExampleHandlerSOAP() {
 		// No need for initial Login() here as simulator.Run already has
 		m := session.NewManager(c)
 
+		time.Sleep(100 * time.Millisecond)
+
 		// check twice if session is valid, sleeping > SessionIdleTimeout in between
 		check := func() {
 			for i := 0; i < 2; i++ {