Browse Source

[1818] Wait for components to start before testing them

Mukund Sivaraman 13 years ago
parent
commit
412304add5

+ 18 - 0
tests/lettuce/features/bindctl_commands.feature

@@ -10,6 +10,13 @@ Feature: control with bindctl
     # currently less standardized than 'help')
     # currently less standardized than 'help')
     Given I have bind10 running with configuration example.org.config
     Given I have bind10 running with configuration example.org.config
 
 
+    And wait for bind10 stderr message ZONEMGR_STARTED
+    And wait for bind10 stderr message AUTH_SERVER_STARTED
+    And wait for bind10 stderr message XFRIN_STARTED
+    And wait for bind10 stderr message XFROUT_STARTED
+    And wait for bind10 stderr message STATS_STARTING
+    And wait for bind10 stderr message STATHTTPD_STARTED
+
     Then remove bind10 configuration Boss/components/NOSUCHMODULE
     Then remove bind10 configuration Boss/components/NOSUCHMODULE
     last bindctl output should contain Error
     last bindctl output should contain Error
 
 
@@ -21,14 +28,25 @@ Feature: control with bindctl
     bind10 module StatsHttpd should be running
     bind10 module StatsHttpd should be running
 
 
     Then remove bind10 configuration Boss/components value b10-xfrout
     Then remove bind10 configuration Boss/components value b10-xfrout
+    And wait for new bind10 stderr message BIND10_PROCESS_ENDED
     last bindctl output should not contain Error
     last bindctl output should not contain Error
     # assuming it won't error for further modules (if it does, the final
     # assuming it won't error for further modules (if it does, the final
     # 'should not be running' tests would fail anyway)
     # 'should not be running' tests would fail anyway)
     Then remove bind10 configuration Boss/components value b10-stats-httpd
     Then remove bind10 configuration Boss/components value b10-stats-httpd
+    And wait for new bind10 stderr message BIND10_PROCESS_ENDED
+    last bindctl output should not contain Error
     Then remove bind10 configuration Boss/components value b10-stats
     Then remove bind10 configuration Boss/components value b10-stats
+    And wait for new bind10 stderr message BIND10_PROCESS_ENDED
+    last bindctl output should not contain Error
     Then remove bind10 configuration Boss/components value b10-zonemgr
     Then remove bind10 configuration Boss/components value b10-zonemgr
+    And wait for new bind10 stderr message BIND10_PROCESS_ENDED
+    last bindctl output should not contain Error
     Then remove bind10 configuration Boss/components value b10-xfrin
     Then remove bind10 configuration Boss/components value b10-xfrin
+    And wait for new bind10 stderr message BIND10_PROCESS_ENDED
+    last bindctl output should not contain Error
     Then remove bind10 configuration Boss/components value b10-auth
     Then remove bind10 configuration Boss/components value b10-auth
+    And wait for new bind10 stderr message BIND10_PROCESS_ENDED
+    last bindctl output should not contain Error
 
 
     bind10 module Xfrout should not be running
     bind10 module Xfrout should not be running
     bind10 module Zonemgr should not be running
     bind10 module Zonemgr should not be running

+ 6 - 0
tests/lettuce/features/default.feature

@@ -4,10 +4,16 @@ Feature: default bind10 config
     Scenario: Check that only the default components are running
     Scenario: Check that only the default components are running
     Given I have bind10 running with configuration default.config
     Given I have bind10 running with configuration default.config
 
 
+    And wait for bind10 stderr message STATS_STARTING
+    And wait for bind10 stderr message STATHTTPD_STARTED
+
+    # These should be running
     bind10 module Boss should be running
     bind10 module Boss should be running
     bind10 module Logging should be running
     bind10 module Logging should be running
     bind10 module Stats should be running
     bind10 module Stats should be running
     bind10 module StatsHttpd should be running
     bind10 module StatsHttpd should be running
+
+    # These should not be running
     bind10 module Resolver should not be running
     bind10 module Resolver should not be running
     bind10 module Xfrout should not be running
     bind10 module Xfrout should not be running
     bind10 module Zonemgr should not be running
     bind10 module Zonemgr should not be running