/* global describe, it, xit */
/* jslint node: true, esnext: true */

'use strict';

const chai = require('chai'),
  assert = chai.assert,
  expect = chai.expect,
  should = chai.should(),
  path = require('path'),
  child_process = require('child_process');

describe('cluster_node', function () {
  it('simple start', done => {
    const child = child_process.exec([
      path.join(__dirname, '../bin/cluster_node'),
      '--trace'
    ].join(' '), (err, stdout, stderr) => {
      console.log(err);
      console.log(stdout);
      //assert.isNull(err);
      assert.match(stdout, /kronos transitioned from starting.*running/);

      done();
    });

    setTimeout(() => child.kill('SIGKILL'), 1000);
  });
});

@@ -292,16 +292,40 @@
 on () %7B%0A
+  this.timeout(10000);%0A%0A
   it('si
@@ -670,24 +670,58 @@
 );%0A    %7D);%0A%0A
+    console.log(%60child:%60, child);%0A
     setTimeo
@@ -752,17 +752,17 @@
 KILL'), 
-1
+5
 000);%0A  

debug on travis