Remove WaitForNothing. WaitForContainerRunning can be used as a basic implementation instead.

This commit is contained in:
Sergei Shitikov
2024-09-01 17:05:31 +02:00
parent de66ea607c
commit 3dd4d2525a
4 changed files with 7 additions and 15 deletions
+3
View File
@@ -4,12 +4,15 @@ declare(strict_types=1);
namespace Testcontainers\Container;
use Testcontainers\Wait\WaitForLog;
class MariaDBContainer extends GenericContainer
{
public function __construct(string $version = 'latest', string $mysqlRootPassword = 'root')
{
parent::__construct('mariadb:' . $version);
$this->withExposedPorts(3306);
$this->withWait(new WaitForLog('ready for connections'));
$this->withEnvironment('MARIADB_ROOT_PASSWORD', $mysqlRootPassword);
}