Exemplo n.º 1
0
 /**
  * Handles a test timeout
  */
 public function timeout()
 {
     $code = 200;
     $ref = $this->getRequestParameter('ref');
     $scope = $this->getRequestParameter('scope');
     try {
         $serviceContext = $this->getServiceContext();
         $result = $this->runnerService->timeout($serviceContext, $scope, $ref);
         $response = ['success' => $result];
         if ($result) {
             $response['testContext'] = $this->runnerService->getTestContext($serviceContext);
         }
         $this->runnerService->persist($serviceContext);
     } catch (common_Exception $e) {
         $response = $this->getErrorResponse($e);
         $code = $this->getErrorCode($e);
     }
     $this->returnJson($response, $code);
 }