nixos/seafile: avoid sleep in tests

Replace sleep statements with wait_until_succeeds

authored by Greizgh and committed by winter.bsky.social 987d2f57 f4aa3233

+3 -9
+3 -9
nixos/tests/seafile.nix
··· 79 79 f"seaf-cli download -l {libid} -s http://server -u admin\@example.com -p seafile_password -d . >&2" 80 80 ) 81 81 82 - client1.sleep(3) 83 - 84 - client1.succeed("seaf-cli status |grep synchronized >&2") 82 + client1.wait_until_succeeds("seaf-cli status |grep synchronized >&2") 85 83 86 84 client1.succeed("ls -la >&2") 87 85 client1.succeed("ls -la test01 >&2") 88 86 89 87 client1.execute("echo bla > test01/first_file") 90 88 91 - client1.sleep(2) 92 - 93 - client1.succeed("seaf-cli status |grep synchronized >&2") 89 + client1.wait_until_succeeds("seaf-cli status |grep synchronized >&2") 94 90 95 91 with subtest("client2 sync"): 96 92 client2.wait_for_unit("default.target") ··· 110 106 f"seaf-cli download -l {libid} -s http://server -u admin\@example.com -p seafile_password -d . >&2" 111 107 ) 112 108 113 - client2.sleep(3) 114 - 115 - client2.succeed("seaf-cli status |grep synchronized >&2") 109 + client2.wait_until_succeeds("seaf-cli status |grep synchronized >&2") 116 110 117 111 client2.succeed("ls -la test01 >&2") 118 112