function testVirtualConnection()
{
$complete = false;
(new NativeReactor())->run(function ($reactor) use(&$complete) {
$db = new Pool("host=" . DB_HOST . ";user="******";pass="******";db=connectiontest", null, $reactor);
/* Multiple queries one after the other must be hold back and dispatched to new connections */
for ($i = 0; $i < 5; $i++) {
$pings[] = $db->ping();
}
(yield \Amp\all($pings));
$complete = true;
});
$this->assertEquals(true, $complete, "Database commands did not complete.");
}