diff --git a/supervisor/tests/test_process.py b/supervisor/tests/test_process.py
index d9370e24c..cd9e49961 100644
--- a/supervisor/tests/test_process.py
+++ b/supervisor/tests/test_process.py
@@ -20,7 +20,7 @@
 from supervisor.tests.base import DummyProcessGroup
 from supervisor.tests.base import DummyFCGIProcessGroup
 
-from supervisor.process import Subprocess
+from supervisor.process import Subprocess, ProcessStates
 from supervisor.options import BadCommand
 
 class SubprocessTests(unittest.TestCase):
@@ -1799,6 +1799,18 @@ def test_before_spawn_gets_socket_ref(self):
         instance.before_spawn()
         self.assertFalse(instance.fcgi_sock is None)
 
+    def test_before_spawn_failure_sets_fatal_state(self):
+        options = DummyOptions()
+        config = DummyPConfig(options, 'good', '/good/filename', uid=1)
+        instance = self._makeOne(config)
+        instance.group = Mock()
+        socket_manager = Mock()
+        instance.group.attach_mock(socket_manager, 'socket_manager')
+        socket_manager.attach_mock(Mock(side_effect=Exception), 'get_socket')
+        self.assertEqual(instance.state,  ProcessStates.STOPPED)
+        instance.spawn()
+        self.assertEqual(instance.state, ProcessStates.FATAL)
+
     def test_after_finish_removes_socket_ref(self):
         options = DummyOptions()
         config = DummyPConfig(options, 'good', '/good/filename', uid=1)