Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions lib/Command/CirclesCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,19 +340,25 @@ private function testLoopback(InputInterface $input, OutputInterface $output): b
return false;
}

$timer = round(microtime(true) * 1000);
$output->write('- Creating async FederatedEvent ');
$test = new FederatedEvent(LoopbackTest::class);
$this->federatedEventService->newEvent($test);

$output->writeln('<info>' . $test->getWrapperToken() . '</info>');
$output->writeln(
'<info>' . $test->getWrapperToken() . '</info> ' .
'(took ' . (round(microtime(true) * 1000) - $timer) . 'ms)'
);

$output->writeln('- Waiting for async process to finish (5s)');
sleep(5);

$output->write('- Checking status on FederatedEvent ');
$wrappers = $this->remoteUpstreamService->getEventsByToken($test->getWrapperToken());

if (count($wrappers) !== 1) {
$output->writeln('<error>Event created too many Wrappers</error>');

return false;
}

$wrapper = array_shift($wrappers);
Expand Down Expand Up @@ -392,8 +398,10 @@ private function saveLoopback(InputInterface $input, OutputInterface $output, st
[$scheme, $cloudId, $path] = $this->parseAddress($loopback);

$question = new ConfirmationQuestion(
'- Do you want to save <info>' . $loopback
. '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i'
'- Do you want to save <info>'
. $loopback
. '</info> as your <info>loopback</info> address ? (y/N) ',
false, '/^(y|Y)/i'
);

$helper = $this->getHelper('question');
Expand Down Expand Up @@ -573,8 +581,10 @@ private function saveInternal(InputInterface $input, OutputInterface $output, st

$output->writeln('');
$question = new ConfirmationQuestion(
'- Do you want to save <info>' . $internal
. '</info> as your <info>internal</info> address ? (y/N) ', false, '/^(y|Y)/i'
'- Do you want to save <info>'
. $internal
. '</info> as your <info>internal</info> address ? (y/N) ',
false, '/^(y|Y)/i'
);

$helper = $this->getHelper('question');
Expand Down