Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stnguyen90 committed Mar 12, 2024
1 parent 412a982 commit daab9e3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/Orchestration/Adapter/DockerCLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ public function getStats(string $container = null, array $filters = []): array
if ($result !== 0) {
throw new Orchestration("Docker Error: {$output}");
}
$dump = function($value) {
$p = var_export($value, true);
$b = debug_backtrace();
print($b[0]['file'] . ':' . $b[0]['line'] . ' - ' . $p . "\n");
};
$dump($output);

$lines = \explode("\n", $output);

Expand Down
4 changes: 2 additions & 2 deletions tests/Orchestration/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -493,8 +493,8 @@ public function testUsageStats(): void

// This allows CPU-heavy load check
$output = '';
static::getOrchestration()->execute($containerId1, ['screen', '-d', '-m', "'stress --cpu 1 --timeout 5'"], $output); // Run in screen so it's background task
static::getOrchestration()->execute($containerId2, ['screen', '-d', '-m', "'stress --cpu 1 --timeout 5'"], $output);
static::getOrchestration()->execute($containerId1, ['screen', '-d', '-m', 'stress --cpu 1 --timeout 5'], $output); // Run in screen so it's background task
static::getOrchestration()->execute($containerId2, ['screen', '-d', '-m', 'stress --cpu 1 --timeout 5'], $output);

// Set CPU stress-test start
\sleep(1);
Expand Down

0 comments on commit daab9e3

Please sign in to comment.