diff --git a/lib/Command/CirclesCheck.php b/lib/Command/CirclesCheck.php index 890c210d4..ce6098403 100644 --- a/lib/Command/CirclesCheck.php +++ b/lib/Command/CirclesCheck.php @@ -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('' . $test->getWrapperToken() . ''); + $output->writeln( + '' . $test->getWrapperToken() . ' ' . + '(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('Event created too many Wrappers'); + + return false; } $wrapper = array_shift($wrappers); @@ -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 ' . $loopback - . ' as your loopback address ? (y/N) ', false, '/^(y|Y)/i' + '- Do you want to save ' + . $loopback + . ' as your loopback address ? (y/N) ', + false, '/^(y|Y)/i' ); $helper = $this->getHelper('question'); @@ -573,8 +581,10 @@ private function saveInternal(InputInterface $input, OutputInterface $output, st $output->writeln(''); $question = new ConfirmationQuestion( - '- Do you want to save ' . $internal - . ' as your internal address ? (y/N) ', false, '/^(y|Y)/i' + '- Do you want to save ' + . $internal + . ' as your internal address ? (y/N) ', + false, '/^(y|Y)/i' ); $helper = $this->getHelper('question');