My goal was to use the unit testing framework to write tests for my HTTP api, but I found out that when using an example like the following, the tests never complete.
This is because the game calls bool Asset(), sees that the result is not ready, does whatever, and invokes again and again and again. My log is spammed with "Assert" but my HTTP RestCallback fired of by my framework code never seems to be allowed to invoke. Is it possible that the testing framework invokes the check each game tick before the http client requests are sent / results are processed and exits because it thinks it needs to wait for the next frame?
Has anyone ever tested if these "async" tests truly work? Because while the example code from the TestingFramework.cs MyAsyncTest "works", it is not async at all, it simply has a bunch of blocking calls and do resolve over a few ticks, but I have my doubts if it is actually possible for the game to do any work in between these ticks.
I have attached a full reproduction file ready to copy and paste:
09:51:26.893 SCRIPT : Waiting for results...
09:51:26.894 SCRIPT : Waiting for results...
09:51:26.894 SCRIPT : Waiting for results...
09:51:26.894 SCRIPT : Waiting for results...
09:51:26.894 SCRIPT : Waiting for results...
09:51:26.894 SCRIPT : Waiting for results...
09:51:26.894 SCRIPT : Waiting for results...
09:51:26.894 SCRIPT : Waiting for results...
09:51:26.895 SCRIPT : Waiting for results...
09:51:26.895 SCRIPT : Waiting for results...