Commit 85cdda7
committed
test: Fail immediately on ErrorResponse
If the server replies with success: false, fail with the error message
rather than hanging blocked waiting for some message to arrive (which it
never will)
Now, the linux failure of RunInTerminal, instead of a hang, looks like:
```
(default): FAIL (2.58s)
test/haskell/Test/DAP/Init.hs:163:
Aborted debugger thread: GHCi.Message.readPipe: end of file
While handling GHCi.Message.readPipe: end of file
IPE backtrace:
GHC.Debugger.Monad. (:)
GHC.Debugger.Run.debugExecution (haskell-debugger/GHC/Debugger/Run.hs:87:28-35)
GHC.Debugger.fmap (haskell-debugger/GHC/Debugger/Monad.hs:98:14-20)
Development.Debug.Adapter.Init.fmap (haskell-debugger/GHC/Debugger/Monad.hs:98:14-20)
Development.Debug.Adapter.Init.catch (haskell-debugger/GHC/Debugger/Monad.hs:99:26-35)
Development.Debug.Adapter.Init.debuggerThread (hdb/Development/Debug/Adapter/Init.hs:310:5-8)
annotateCallStackIO, called at haskell-debugger/GHC/Debugger/Monad.hs:219:104 in haskell-debugger-0.12.3.0-inplace:GHC.Debugger.Monad
DAP.Adaptor.registerNewDebugSession (src/DAP/Adaptor.hs:181:28-66)
HasCallStack backtrace:
collectExceptionAnnotation, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:170:37 in ghc-internal:GHC.Internal.Exception
toExceptionWithBacktrace, called at libraries/ghc-internal/src/GHC/Internal/Exception.hs:90:42 in ghc-internal:GHC.Internal.Exception
throw, called at compiler/GHC/Runtime/Interpreter/Process.hs:133:7 in ghc-9.14.1-8674:GHC.Runtime.Interpreter.Process
Use -p '/runInTerminal/&&/(default)/' to rerun this test only.
(--internal-interpreter): OK (0.70s)
--- SERVER OUTPUT ---
See: /tmp/nix-shell-90645-1510503319/nix-shell-212288-2997796286/hdb-test-c88ed77b842c68ec/T44
Might need: KEEP_TEMP_DIRS=True
---------------------
```
Where the server output comes from the previous commits which now log
the server stdout/stderr to persistent files if KEEP_TEMP_DIRS=True1 parent 3c1acf3 commit 85cdda7
1 file changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
159 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
| |||
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
0 commit comments