vapor/queues

How to test jobs using XCTest?

henrypratt opened this issue · 4 comments

How would you go about testing a job since it is run on a thread that does not notify when it is complete? Right now I am just calling sleep(10) before running my asserts, but I would like to be able to know when an AsyncJob is done.

How would this work when using async/await for tests and queues?

0xTim commented

It depends on what your job does but it's mostly the same, just convert futures to a/a code

Thanks!