                 done()
               , 200
 
-  describe 'timeout', ->
-    it 'is set to 5000 by default', (done) ->
-      hooksWorkerClient = new HooksWorkerClient(runner)
-      assert.equal hooksWorkerClient.timeout, 5000
-      done()
-
-    it 'can be set to 10000', (done) ->
-      runner.hooks.configuration.options['hook-worker-timeout'] = 10000
-
-      hooksWorkerClient = new HooksWorkerClient(runner)
-      assert.equal hooksWorkerClient.timeout, 10000
-      done()
+  describe "'hooks-worker-*' configuration options", ->
+    scenarios = [
+        property: 'timeout'
+        option: 'hooks-worker-timeout'
+      ,
+        property: 'connectTimeout'
+        option: 'hooks-worker-connect-timeout'
+      ,
+        property: 'connectRetry'
+        option: 'hooks-worker-connect-retry'
+      ,
+        property: 'afterConnectWait'
+        option: 'hooks-worker-after-connect-wait'
+      ,
+        property: 'termTimeout'
+        option: 'hooks-worker-term-timeout'
+      ,
+        property: 'termRetry'
+        option: 'hooks-worker-term-retry'
+      ,
+        property: 'handlerHost'
+        option: 'hooks-worker-handler-host'
+      ,
+        property: 'handlerPort'
+        option: 'hooks-worker-handler-port'
+    ]
+
+    for scenario in scenarios
+      do (scenario) ->
+        describe "Option '#{scenario.option}'", ->
+          defaultValue = commandLineOptions[scenario.option].default
+          changedValue = defaultValue + 42
+
+          it "is set to #{defaultValue} by default", ->
+            hooksWorkerClient = new HooksWorkerClient(runner)
+            assert.equal hooksWorkerClient[scenario.property], defaultValue
+
+          it 'can be set to a different value', ->
+            runner.hooks.configuration.options[scenario.option] = changedValue
+            hooksWorkerClient = new HooksWorkerClient(runner)
+            assert.equal hooksWorkerClient[scenario.property], changedValue


    runner = new TransactionRunner {}
    runner.hooks = new Hooks(logs: [], logger: console)

    runner.hooks.configuration =
      options: {}

    for level in logLevels
      sinon.stub loggerStub, level, (msg1, msg2) ->

whichStub =  require '../../src/which'

Hooks = require '../../src/hooks'
commandLineOptions = require '../../src/options'

PORT = 61321

