When running `./pants test ::` is there anyway to ...
# general
c
When running
./pants test ::
is there anyway to ensure that a given test gets run first? I have a very slow tests that I would like to ensure is in the first batch. I think it could speed up my test sweet since it runs long after every other test.
w
there is not currently, but that is a very good idea.
do you have
python_test(.., timeout=..)
values set for those?
j
Could test tags be used for this?
(have not read or used)
And of course this assumes all tests are python. 🤔
c
I don't have a timeout set since we have some pretty long tests which we are working on cleaning up.
w
@jolly-midnight-72759: yea. it also assumes that they’re all running in the same process,
c
They are python tests, but it's an entire target that is slow. My assumption was pants was creating processes for each test invokation
w
if the tests had
timeout
values configured, we could run them from longest to shortest… without those we’d have to have some “memory” of how long they took
đź‘Ť 1
but worth doing most likely.
c
I could figure out a timeout that worked for my test since the timeout could be arbitrarily large.
Using
timeout
that way is a cool idea
đź‘Ť 1
h
Stu, do we then order the await MultiGet in the order we want?
w
I don't think that that would guarantee it... I think we would need to fiddle a bit deeper, and probably adjust AsyncSemaphore to have a notion of priority
because all sorts of io might happen immediately below the MultiGet and before we actually wait on the AsyncSemaphore for a slot to run
so… yea, i think that it might look like forking tokio’s Semaphore, and swapping out the internal list for a priority queue, basically
it’s possible that they’d accept a patch for it.
đź‘Ť 1