File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -359,6 +359,7 @@ test-suite ghcide-tests
359
359
safe-exceptions,
360
360
shake,
361
361
hls-graph,
362
+ sqlite-simple,
362
363
tasty,
363
364
tasty-expected-failure,
364
365
tasty-hunit,
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ import Ide.Types
101
101
import Data.String (IsString (fromString ))
102
102
import qualified Language.LSP.Types as LSP
103
103
import Data.IORef.Extra (atomicModifyIORef_ )
104
+ import Database.SQLite.Simple (SQLError (SQLError ))
104
105
import Development.IDE.Core.Rules (mainRule )
105
106
import qualified Development.IDE.Plugin.HLS.GhcIde as Ghcide
106
107
import qualified Development.IDE.Plugin.Test as Test
@@ -5378,7 +5379,11 @@ testIde rootDir arguments session = do
5378
5379
{ optShakeOptions = (optShakeOptions ideOptions) {shakeThreads = 2 }}
5379
5380
}
5380
5381
5381
- res <- runSessionWithHandles hInWrite hOutRead config lspTestCaps rootDir session
5382
+ let runIt = runSessionWithHandles hInWrite hOutRead config lspTestCaps rootDir session
5383
+ -- catch SQL errors and retry once to handle the hiedb getting locked by a previous test
5384
+ res <- runIt `catch` \ SQLError {} -> do
5385
+ sleep 1
5386
+ runIt
5382
5387
5383
5388
hClose hInWrite
5384
5389
timeout 3 (wait server) >>= \ case
You can’t perform that action at this time.
0 commit comments