Improve test determinism
CanonicalizeTzS2PolygonsTest#regressionTest has started breaking on some
test environments. It is due to java.util.File.listFiles() not have a
deterministic order, assumed to be due to the underlying file system.
This commit ensures that Types.listFiles() used by the code under test
is now deterministic and fixes the expected output data based on the new
order.
The problem was root-caused by sorting in Types.listFiles() in both
forward and reverse order - the test would only pass if the files were
sorted in reverse order.
Test: atest --host geotz_data_pipeline_tests
Bug: 171043404
Change-Id: If039ff7cb385497713385ce8bc37055539006e70
2 files changed