File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -704,7 +704,7 @@ module.exports = function Machine_prototype_exec (done) {
704
704
'If you are the implementor of this machine, and you\'re sure there are no problems, you can configure ' +
705
705
'the maximum expected number of miliseconds for this machine using `timeout` (a top-level property in ' +
706
706
'your machine definition). To disable this protection, set `timeout` to 0.' ) ;
707
- err . code = 'E_TIMEOUT ' ;
707
+ err . code = 'E_MACHINE_TIMEOUT ' ;
708
708
709
709
// Trigger callback
710
710
implementorSwitchback . error ( err ) ;
Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ describe('timeout', function (){
23
23
it ( 'should call its error exit with a timeout error' , function ( done ) {
24
24
machineInstance ( ) . exec ( {
25
25
error : function ( err ) {
26
- if ( err . code === 'E_TIMEOUT ' ) {
26
+ if ( err . code === 'E_MACHINE_TIMEOUT ' ) {
27
27
return done ( ) ;
28
28
}
29
- return done ( new Error ( 'Expecting Error instance w/ `code` === "E_TIMEOUT ", but instead got this error (code:' + err . code + '): ' + err . stack ) ) ;
29
+ return done ( new Error ( 'Expecting Error instance w/ `code` === "E_MACHINE_TIMEOUT ", but instead got this error (code:' + err . code + '): ' + err . stack ) ) ;
30
30
} ,
31
31
success : function ( ) {
32
32
return done ( new Error ( 'wtf' ) ) ;
@@ -54,10 +54,10 @@ describe('timeout', function (){
54
54
it ( 'should call its error exit with a timeout error' , function ( done ) {
55
55
machineInstance ( ) . exec ( {
56
56
error : function ( err ) {
57
- if ( err . code === 'E_TIMEOUT ' ) {
57
+ if ( err . code === 'E_MACHINE_TIMEOUT ' ) {
58
58
return done ( ) ;
59
59
}
60
- return done ( new Error ( 'Expecting Error instance w/ `code` === "E_TIMEOUT ", but instead got this error (code:' + err . code + '): ' + err . stack ) ) ;
60
+ return done ( new Error ( 'Expecting Error instance w/ `code` === "E_MACHINE_TIMEOUT ", but instead got this error (code:' + err . code + '): ' + err . stack ) ) ;
61
61
} ,
62
62
success : function ( ) {
63
63
return done ( new Error ( 'Should not have called the success exit (should have been prevented by timeout alarm)' ) ) ;
You can’t perform that action at this time.
0 commit comments