Skip to content

Commit

Permalink
cleanup: minor code cleanup
Browse files Browse the repository at this point in the history
cleaned up more processes left after tests ran
  • Loading branch information
Akamaozu committed Dec 24, 2017
1 parent e38df7d commit dd1f053
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions test/test.js
Expand Up @@ -769,7 +769,6 @@ describe('Supe Test Suite', function(){
});

describe('Citizen Noticeboard Integration', function(){

var supervisor;

beforeEach( function(){
Expand Down Expand Up @@ -851,44 +850,34 @@ describe('Supe Test Suite', function(){
});

it('will ignore duplicate notice pipe requests to supervisor\'s noticeboard', function( done ){

this.timeout(10000);

var sample_notice = 'sample-notice',
failed = false;
failed = false,
citizen;

supervisor.noticeboard.notify( sample_notice, 42 );

supervisor.noticeboard.watch( 'double-piper-output', 'print', function( msg ){
var output = msg.notice;
console.log( 'output: ', output.output );
});

supervisor.noticeboard.watch( 'double-piper-error', 'print', function( msg ){
var output = msg.notice;
console.log( 'error: ', output.error );
});

supervisor.noticeboard.watch( 'double-piper-crashed', 'fail-test', function(){
failed = true;
console.log( 'double piper crashed' );
});

supervisor.start( 'double-piper', './test/citizen/duplicate-notice-sender', { retries: 0 });
citizen = supervisor.start( 'double-piper', './test/citizen/duplicate-notice-sender', { retries: 0 });

setTimeout( function(){

assert.equal( failed, false );
done();

// cleanup
citizen.ref.kill();
}, 3000 );
});

it('can post a notice on supervisor\'s noticeboard', function( done ){

this.timeout( 10000 );

supervisor.noticeboard.watch( 'sample-notice-from-citizen', 'do-assertions', function( msg ){

done();
});

Expand Down

0 comments on commit dd1f053

Please sign in to comment.