Skip to content

Commit 2b59ad9

Browse files
committed
Attempt #2
1 parent 62151fc commit 2b59ad9

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tests/TestCase.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Rapidez\Core\Tests;
44

5+
use Illuminate\Database\QueryException;
56
use Illuminate\Foundation\Testing\DatabaseTransactions;
6-
use Illuminate\Support\Facades\Cache;
77
use Illuminate\Support\Facades\Schema;
88
use Orchestra\Testbench\TestCase as BaseTestCase;
99
use Rapidez\Core\Facades\Rapidez;
@@ -21,9 +21,12 @@ public function setUp(): void
2121

2222
$this->setUpDatabase($this->app);
2323

24-
Cache::flush();
25-
26-
Rapidez::setStore(1);
24+
try {
25+
Rapidez::setStore(1);
26+
} catch (QueryException) {
27+
// If at first you don't succeed, try, try again.
28+
Rapidez::setStore(1);
29+
}
2730
}
2831

2932
protected function getPackageProviders($app)

0 commit comments

Comments
 (0)