#Testing with createMany causing unpredictable results

8 messages · Page 1 of 1 (latest)

hearty copper
#

Sometimes the assertJsonCount does work, sometimes don't

The controller code: ```php
public function commands(Request $request)
{
$scope = $request->route('scope');
return $request->store()->commands()->whereScope($scope)->ready()->limit(20)->get();
}

#

In the screenshot, you can see that the previous test had results on the DD.

#

Aditional composer.json context

#

Same test, different results

#

Adding a sleep(1) allowed me to test it 15x in a row without failing.

#

I think that is the reason, I'm going to implement time travel on the test.