commit | 9dd253ea215bd0d11be2038050c2d77217042e36 | [log] [tgz] |
---|---|---|
author | Paul Stewart <pstew@chromium.org> | Mon Apr 22 08:32:59 2013 -0700 |
committer | ChromeBot <chrome-bot@google.com> | Mon Apr 22 16:44:35 2013 -0700 |
tree | dbc914ee01c918905f0623a88f7a146b6b55d1d2 | |
parent | 76a87fd487ad35ac94e69c5bcaeca68f5ecc53a3 [diff] |
shill: ManagerTest: Reset Service::serial_number_ Some Manager unit tests make implicit assumptions that services sorted by no other means will be sorted sequentially based on the order they were created. This depends on the string-wise comparison between the "unique_name" property which is generated from a monotonically increasing integer Service::serial_number_. Depending on how many services were created in previous unit tests, we may, for example instantiate "99" and "100", which will cause this sorting assumption to break. Since this sorting property is of no consequence in normal operation, fix this by setting an explicit serial number during manager unit tests. BUG=None TEST=Run unit tests Change-Id: I8eac4a4d2949f1743154407c9cf8feb3bee752fe Reviewed-on: https://gerrit.chromium.org/gerrit/48801 Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>