diff options
| author | Michael Biebl <biebl@debian.org> | 2019-03-31 10:11:55 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-03-31 10:11:55 +0200 |
| commit | 4b96345400eafd4bfc70fd77ef19e026d690aca0 (patch) | |
| tree | fed6aa242532689235f5333132ff98b82961765f /tools/test-networkmanager-service.py | |
| parent | 8ea1145a9e031c8021590abf780dd7c149e231cf (diff) | |
| parent | f66fcea265a5869667d832386e9337237a44afef (diff) | |
Merge branch 'master' into stretch-backports
Diffstat (limited to 'tools/test-networkmanager-service.py')
| -rwxr-xr-x | tools/test-networkmanager-service.py | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/tools/test-networkmanager-service.py b/tools/test-networkmanager-service.py index 8a37fb17..9aa44a90 100755 --- a/tools/test-networkmanager-service.py +++ b/tools/test-networkmanager-service.py @@ -916,16 +916,8 @@ class WifiDevice(Device): self.aps = [] self.scan_cb_id = None - # Note: we would like to simulate how nmcli calls RequestScan() and we could - # do so by using an older timestamp. However, that makes the client tests - # racy, because if a bunch of nmcli instances run in parallel against this - # service, earlier instances will issue a RequestScan(), while later instances - # won't do that (because the LastScan timestamp is already updated). That means, - # the later instances will print the scan result immediately, and in another sort - # order. That should be fixed, by nmcli not starting to print anything, before - # all RequestScan() requests complete, and thus, always print a consistent list - # of results. - ts = NM.utils_get_timestamp_msec() + # Use a randomly older timestamp to trigger RequestScan() from the client + ts = max(0, NM.utils_get_timestamp_msec() - Util.random_int(self.path, 20000, 40000)) props = { PRP_WIFI_HW_ADDRESS: mac, |