mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for tests
This commit is contained in:
parent
228f3af4b9
commit
4a968e739c
@ -73,7 +73,6 @@ class GmailTransport extends AbstractTransport
|
||||
/* Need to slow down */
|
||||
if($e->getCode() == '429') {
|
||||
|
||||
sleep(rand(5,10));
|
||||
nlog("429 google - retrying ");
|
||||
$service->users_messages->send('me', $body, []);
|
||||
|
||||
|
@ -75,7 +75,7 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
public function backoff()
|
||||
{
|
||||
return [30, 60, 180, 240];
|
||||
return [5, 10, 30, 240];
|
||||
}
|
||||
|
||||
public function handle()
|
||||
@ -445,7 +445,6 @@ class NinjaMailerJob implements ShouldQueue
|
||||
$message->getHeaders()->addTextHeader('gmailtoken', $token);
|
||||
});
|
||||
|
||||
sleep(rand(1,3));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -472,7 +471,6 @@ class NinjaMailerJob implements ShouldQueue
|
||||
|
||||
$google->getClient()->setAccessToken(json_encode($user->oauth_user_token));
|
||||
|
||||
sleep(rand(1,6));
|
||||
}
|
||||
catch(\Exception $e) {
|
||||
$this->logMailError('Gmail Token Invalid', $this->company->clients()->first());
|
||||
|
@ -59,7 +59,7 @@ class EmailMailer implements ShouldQueue
|
||||
|
||||
public function backoff()
|
||||
{
|
||||
return [30, 60, 180, 240];
|
||||
return [10, 30, 60, 240];
|
||||
}
|
||||
|
||||
public function handle(): void
|
||||
@ -379,7 +379,6 @@ class EmailMailer implements ShouldQueue
|
||||
$message->getHeaders()->addTextHeader('gmailtoken', $token);
|
||||
});
|
||||
|
||||
sleep(rand(1,3));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -406,7 +405,6 @@ class EmailMailer implements ShouldQueue
|
||||
|
||||
$google->getClient()->setAccessToken(json_encode($user->oauth_user_token));
|
||||
|
||||
sleep(rand(2,4));
|
||||
}
|
||||
catch(\Exception $e) {
|
||||
$this->logMailError('Gmail Token Invalid', $this->email_service->company->clients()->first());
|
||||
|
@ -433,7 +433,7 @@ class BaseApiTest extends TestCase
|
||||
'X-API-SECRET' => config('ninja.api_secret'),
|
||||
'X-API-TOKEN' => $this->low_token,
|
||||
])->get('/api/v1/companies/'.$this->company->hashed_id)
|
||||
->assertStatus(401);
|
||||
->assertStatus(403);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user