   (fsharp-mode-wrapper '("Program.fs")
    (lambda ()
      (find-file "Test1/Program.fs")
-     (fsharp-mode-completion/load-project "Test1.fsproj")
      (accept-process-output ac-fsharp-completion-process waittime)
-     (while (eq nil ac-fsharp-project-files)
-       (sleep-for 1))
+     (with-timeout (waittime)
+       (while (null ac-fsharp-project-files)
+         (sleep-for 1)))
      (should (string-match-p "Test1/Program.fs" (mapconcat 'identity ac-fsharp-project-files "")))
      (should (string-match-p "Test1/FileTwo.fs" (mapconcat 'identity ac-fsharp-project-files ""))))))
 

  (fsharp-mode-wrapper '("Program.fs")
   (lambda ()
     (find-file "Test1/Program.fs")
     (fsharp-mode-completion/start-process)
     (should (buffer-live-p (get-buffer "*fsharp-complete*")))
     (should (process-live-p ac-fsharp-completion-process))
     (process-send-string ac-fsharp-completion-process "help\n")
     (switch-to-buffer "*fsharp-complete*")
     (with-timeout (waittime)
       (while (string= (buffer-string) "")
         (accept-process-output ac-fsharp-completion-process)))
     (should (search-backward "trigger completion request" nil t)))))


      (progn (load-fsharp-mode)
             (funcall body))
    (sleep-for 1)
    (dolist (buf bufs)
      (when (get-buffer buf)
        (switch-to-buffer buf)
        (revert-buffer t t)
        (kill-buffer buf)))
    (ac-fsharp-quit-completion-process)
    (when (get-buffer "*fsharp-complete*")
      (kill-buffer "*fsharp-complete*"))))

