diff options
| author | Steve Kemp <steve@steve.org.uk> | 2012-11-13 13:08:24 +0000 | 
|---|---|---|
| committer | Steve Kemp <steve@steve.org.uk> | 2012-11-13 13:08:24 +0000 | 
| commit | 37b701fc0c7002e2d84f2d61bd9c57085c8b9542 (patch) | |
| tree | e7c4a9eecd23fb44db9e17a63ec2022ec802d093 | |
| parent | 22e1d5a39e0a8a885adc3d88bff91fa58a3eb119 (diff) | |
  Updated to ensure that both the methods we expect from the
  protocol-tests are present.
| -rwxr-xr-x | worker/worker | 14 | 
1 files changed, 13 insertions, 1 deletions
| diff --git a/worker/worker b/worker/worker index 655c7ab..bc0d65e 100755 --- a/worker/worker +++ b/worker/worker @@ -229,6 +229,18 @@ class Custodian        obj = eval(clazz).new( hash ) + +      # +      # Ensure that the object we load implements the methods +      # we expect +      # +      if ( ( ! obj.respond_to?( "error") ) || +           ( ! obj.respond_to?( "run_test" ) ) ) +        puts "Class #{clazz} doesn't implement the full protocol-test API" +      end + + +        #        #  We'll run no more than MAX times.        # @@ -248,7 +260,7 @@ class Custodian        if ( ! success )          # Raise the alert, passing the error message. -        alert.raise( obj.error ) +        alert.raise( obj.error() )        end      rescue => ex        puts "Exception raised processing job: #{ex}" | 
