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