[PATCH] First HTTP functional test of the RPC interface
fmang at mg0.fr
Wed Apr 15 21:54:45 UTC 2020
Lukas Fleischer [2020-04-15 17:06:15 -0400]
> The new tests are going to require mock data in the database, too,
> right? Do you intend to populate the database separately for each test?
> Note that many tests require a common basic set of data, such as user
> accounts and packages. If we want different initialization procedures
> for each test, we should at least have some way of including this common
> data set.
We have the whole Python arsenal within arm’s reach. I’m sure we’ll find
a way. It’s dumb code anyway.
> The setup script only takes a couple of milliseconds, so having to
> execute it multiple times doesn't bother me too much. If you have any
> suggestions on how to reduce some of the duplicate steps, feel free to
> post them here, though.
When I run test/t2600-rendercomment.t and measure the time, it spends
almost 8 seconds on setup.sh, then 3 seconds to actually run the tests.
That’s quite significant.
$ ./t2600-rendercomment.t | ts -s %.s
0.000010 Starting setup.sh
7.887877 Compeleted setup.sh
8.540758 ok 1 - Test comment rendering.
9.050442 ok 2 - Test Markdown conversion.
9.574958 ok 3 - Test HTML sanitizing.
10.098891 ok 4 - Test link conversion.
10.617952 ok 5 - Test Git commit linkification.
11.156466 ok 6 - Test Flyspray issue linkification.
11.657045 ok 7 - Test headings lowering.
11.673559 # passed all 7 test(s)
More information about the aur-dev