selftest: check for winbind on 1-second basis
authorMichael Adam <obnox@samba.org>
Wed, 15 Jun 2016 23:00:13 +0000 (01:00 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 12 Jul 2016 15:49:19 +0000 (17:49 +0200)
There is a chance to reduce the overall time spent checking.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
selftest/target/Samba3.pm

index 61ec9860d42b7b0355873f628bd524ec407fb4b0..60300f880c2fd010d4eb0f499894bf730a5b25e3 100755 (executable)
@@ -1888,11 +1888,11 @@ sub wait_for_start($$$$$)
            do {
                $ret = system("SELFTEST_WINBINDD_SOCKET_DIR=" . $envvars->{SELFTEST_WINBINDD_SOCKET_DIR} . " " . Samba::bindir_path($self, "wbinfo") . " --ping-dc");
                if ($ret != 0) {
-                   sleep(2);
+                   sleep(1);
                }
                $count++;
-           } while ($ret != 0 && $count < 10);
-           if ($count == 10) {
+           } while ($ret != 0 && $count < 20);
+           if ($count == 20) {
                print "WINBINDD not reachable after 20 seconds\n";
                teardown_env($self, $envvars);
                return 0;