From: hololeap <hololeap@protonmail.com>
Signed-off-by: hololeap <hololeap@protonmail.com>

Many HLS tests time out on older computers. This patch replaces the normal
timeout function with one that never times out and never fails. This will
help devs with older computers run the tests.

diff -urN lsp-test-0.14.1.0/src/Language/LSP/Test/Session.hs lsp-test-0.14.1.0-r1/src/Language/LSP/Test/Session.hs
--- lsp-test-0.14.1.0/src/Language/LSP/Test/Session.hs	2001-09-08 19:46:40.000000000 -0600
+++ lsp-test-0.14.1.0-r1/src/Language/LSP/Test/Session.hs	2022-09-22 21:52:07.907486545 -0600
@@ -81,7 +81,6 @@
 #ifndef mingw32_HOST_OS
 import System.Process (waitForProcess)
 #endif
-import System.Timeout ( timeout )
 import Data.IORef
 import Colog.Core (LogAction (..), WithSeverity (..), Severity (..))
 
@@ -485,3 +484,7 @@
           | otherwise       = Cyan
 
         showPretty = B.unpack . encodePretty
+
+-- A faux timeout; it just lets the code block run indefinitely.
+timeout :: Int -> IO a -> IO (Maybe a)
+timeout _ = fmap Just
diff -urN lsp-test-0.14.1.0/test/Test.hs lsp-test-0.14.1.0-r1/test/Test.hs
--- lsp-test-0.14.1.0/test/Test.hs	2001-09-08 19:46:40.000000000 -0600
+++ lsp-test-0.14.1.0-r1/test/Test.hs	2022-09-22 22:23:45.247487465 -0600
@@ -50,17 +50,6 @@
       runSessionWithHandles hin hout def didChangeCaps "." $ return ()
 
     describe "withTimeout" $ do
-      it "times out" $ \(hin, hout) ->
-        let sesh = runSessionWithHandles hin hout def fullCaps "." $ do
-                    openDoc "test/data/renamePass/Desktop/simple.hs" "haskell"
-                    -- won't receive a request - will timeout
-                    -- incoming logging requests shouldn't increase the
-                    -- timeout
-                    withTimeout 5 $ skipManyTill anyMessage (message SWorkspaceApplyEdit)
-          -- wait just a bit longer than 5 seconds so we have time
-          -- to open the document
-          in timeout 6000000 sesh `shouldThrow` anySessionException
-
       it "doesn't time out" $ \(hin, hout) ->
         let sesh = runSessionWithHandles hin hout def fullCaps "." $ do
                     openDoc "test/data/renamePass/Desktop/simple.hs" "haskell"
