uptane / aktualizr

C++ Uptane Client
Mozilla Public License 2.0
15 stars 15 forks source link

Speed up the entire test run by reducing timeouts in t_uptane_network #10

Closed cajun-rat closed 2 years ago

cajun-rat commented 2 years ago

In my machine the test run (ctest -j8) takes 192s, which is the entire length of the t_uptane_network test. ctest is smart enough to schedule it first, but it still finishes last. The slow test case is the 'NoConnection' one, which is caused by a bunch of 60s timeouts.

Fix this by reducing the timeouts to 1s, but only in this test.

These tests also had a bunch of duplication around setting StorageType::kSqlite. I think at one point there were also tests for StorageType::kFileSystem, but these have since been deleted. While I was at it I renamed the tests to not include underscores, as per the Googletest FAQ:

http://google.github.io/googletest/faq.html

Finally, ensure aktualizr-get is built by the build_tests target.

Signed-off-by: Phil Wise phil@phil-wise.com