소스 검색

Validate the test even when it's in timeout

Gaël Métais 11 년 전
부모
커밋
565d1185ab
2개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 6 0
      app/lib/phantomasWrapper.js
  2. 2 1
      phantomas_custom/core/scopeYLT/scopeYLT.js

+ 6 - 0
app/lib/phantomasWrapper.js

@@ -81,6 +81,12 @@ var PhantomasWrapper = function() {
                     err = 1001;
                 }
 
+                // Don't cancel test if it is a timeout
+                if (err === 252) {
+                    console.log('Timeout after ' + options.timeout + ' seconds. But it\'s not a problem, the test is valid.');
+                    err = null;
+                }
+
                 if (err) {
                     console.log('Attempt failed for test id ' + task.testId + '. Error code ' + err);
                 }

+ 2 - 1
phantomas_custom/core/scopeYLT/scopeYLT.js

@@ -56,7 +56,8 @@ exports.module = function(phantomas) {
                             try {
                                 result = origFn.apply(this, arguments);
                             } catch(e) {
-                                phantomas.log('Error catched on spyed function "' + fn + '"": ' + e);
+                                phantomas.log('Error catched on spyed function "' + fn + '": ' + e);
+                                phantomas.log(arguments);
                             } finally {
 
                                 // After