AsyncTask: Fix retrieval of null data from the thread-local storage (#6176)

This commit is contained in:
TheNewHEROBRINE
2023-12-06 14:40:09 +01:00
committed by GitHub
parent bd65948453
commit 2420dee8be
2 changed files with 21 additions and 1 deletions

View File

@ -121,4 +121,23 @@ class AsyncPoolTest extends TestCase{
usleep(50 * 1000);
}
}
public function testNullComplexDataFetch() : void{
$this->pool->submitTask(new class extends AsyncTask{
public function __construct(){
$this->storeLocal("null", null);
}
public function onRun() : void{
//dummy
}
public function onCompletion() : void{
AsyncPoolTest::assertNull($this->fetchLocal("null"));
}
});
while($this->pool->collectTasks()){
usleep(50 * 1000);
}
}
}