Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to locally run yarn test #17357

Closed
nreese opened this issue Mar 22, 2018 · 6 comments
Closed

Unable to locally run yarn test #17357

nreese opened this issue Mar 22, 2018 · 6 comments
Labels

Comments

@nreese
Copy link
Contributor

nreese commented Mar 22, 2018

Running yarn test locally on master fails. https://discuss.elastic.co/t/6-tests-fails-every-time-w-fresh-pull-from-repo/125268

single test that uses esArchiver test:
     Error: expected 1 to equal 0
      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.be.Assertion.equal (node_modules/expect.js/index.js:216:10)
      at Assertion.(anonymous function) [as be] (node_modules/expect.js/index.js:69:24)
      at Context.<anonymous> (src/functional_test_runner/__tests__/integration/with_es_archiver.js:78:40)
      at <anonymous>:null:null
      at process._tickDomainCallback (internal/process/next_tick.js:228:7)
@nreese nreese added the test label Mar 22, 2018
@tylersmalley
Copy link
Contributor

tylersmalley commented Mar 22, 2018

This is passing on CI, and for me locally.

There should be more details regarding this error when it was run. Searching for the subject usually brings me too it.

@emgarcia
Copy link

I'm facing the same issue, just a bit different than nreese's.

I'm trying to make sure I start with a solid baseline Kibana, but it seems like no matter what I do every single time I run yarn test the suite fails complete with no errors.

I'm running yarn test against a freshly git cloned repo from github.

These are the steps I take:

1. git clone <kibana_repo>
2. git fetch --tags
3. git checkout tags/v6.2.3 -b v6.2.3
4. nvm install 6.12.2 && nvm use 6.12.2
5. yarn
6. yarn test

The example provided above was my attempt for tag release 6.2.3, but I have also tried going through the same steps for tag release v6.2.2 and branch 6.2.

I also made sure to install all dependencies to be able to build kibana from source as well. I'm trying to do all this on Debian 9.4.

sudo apt git build-essential ruby-dev rpm gcc
gem install fpm -v 1.5.0

ERRORS

 1657 passing (1m)
  5 pending
  5 failing

  1) single test that uses esArchiver "before all" hook:
     Error: Command failed: /home/ansible/kibana/esvm/test_utils/es_test_cluster/branch-6.x/bin/elasticsearch -h

      at ChildProcess.exithandler (child_process.js:199:12)
      at maybeClose (internal/child_process.js:920:16)
      at Socket.<anonymous> (internal/child_process.js:351:11)
      at Pipe._handle.close [as _onclose] (net.js:497:12)


  2) single test that uses esArchiver "after all" hook:
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.


  3) createOrUpgradeSavedConfig() "before all" hook:
     Error: Command failed: /home/ansible/kibana/esvm/test_utils/es_test_cluster/branch-6.x/bin/elasticsearch -h

      at ChildProcess.exithandler (child_process.js:199:12)
      at maybeClose (internal/child_process.js:920:16)
      at Socket.<anonymous> (internal/child_process.js:351:11)
      at Pipe._handle.close [as _onclose] (net.js:497:12)


  4) uiSettings/routes "before all" hook: startServers:
     Error: Command failed: /home/ansible/kibana/esvm/test_utils/es_test_cluster/branch-6.x/bin/elasticsearch -h

      at ChildProcess.exithandler (child_process.js:199:12)
      at maybeClose (internal/child_process.js:920:16)
      at Socket.<anonymous> (internal/child_process.js:351:11)
      at Pipe._handle.close [as _onclose] (net.js:497:12)


  5) uiSettings/routes "after all" hook: stopServers:
     Error: Timeout of 10000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves.




Warning: Task "simplemocha:all" failed. Use --force to continue.

Aborted due to warnings.
error An unexpected error occurred: "Command failed.
Exit code: 3
Command: sh
Arguments: -c grunt test
Directory: /home/ansible/kibana
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/home/ansible/kibana/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@tylersmalley
Copy link
Contributor

@emgarcia can you also grab the details from during the test execution? The commonality in all of these tests is it's starting Elasticsearch. It's possible it's a Java-related issue.

@emgarcia
Copy link

emgarcia commented Mar 23, 2018

@tylersmalley Thanks! That seem to fix all the issues related to Elasticsearch. There is still one test still failing, but here's my server setup in case it provides any additional help. This is all being executed on a fresh install Debian 9.4 and targeted Kibana version of 6.2.3.

# dependencies before doing anything
sudo apt update && sudo apt upgrade -y
sudo apt install git default-jdk build-essential ruby-dev rpm -y
java -version
sudo gem install fpm -v 1.5.0
sudo gem install pleaserun -v 0.0.24

# NVM + yarn
wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
nvm install 6.12.2
nvm use 6.12.2
npm install -g yarn

# kibana
git clone https://github.com/elastic/kibana.git
cd kibana
git fetch --tags
git checkout tags/v6.2.3 -b v6.2.3
yarn
yarn test

The only test that failed after ensuring I had java installed was the following:

ERRORS

  1671 passing (2m)
  5 pending
  1 failing

  1) remote default window size restores the window size after a suite completes:

      Error: expected [] to sort of equal [ { name: 'before suite1',
    size: { width: 1600, height: 1000 } },
  { name: 'in suite1',
    size: { width: 1000, height: 1000 } },
  { name: 'before suite2',
    size: { width: 1000, height: 1000 } },
  { name: 'in suite2',
    size: { width: 900, height: 900 } },
  { name: 'after suite2',
    size: { width: 900, height: 900 } },
  { name: 'before suite3',
    size: { width: 1000, height: 1000 } },
  { name: 'in suite3',
    size: { width: 800, height: 800 } },
  { name: 'before suite3.1',
    size: { width: 800, height: 800 } },
  { name: 'in suite3.1',
    size: { width: 700, height: 700 } },
  { name: 'after suite3.1',
    size: { width: 700, height: 700 } },
  { name: 'after suite3',
    size: { width: 800, height: 800 } },
  { name: 'after suite1',
    size: { width: 1000, height: 1000 } } ]
      + expected - actual

      -[]
      +[
      +  {
      +    "name": "before suite1"
      +    "size": {
      +      "height": 1000
      +      "width": 1600
      +    }
      +  }
      +  {
      +    "name": "in suite1"
      +    "size": {
      +      "height": 1000
      +      "width": 1000
      +    }
      +  }
      +  {
      +    "name": "before suite2"
      +    "size": {
      +      "height": 1000
      +      "width": 1000
      +    }
      +  }
      +  {
      +    "name": "in suite2"
      +    "size": {
      +      "height": 900
      +      "width": 900
      +    }
      +  }
      +  {
      +    "name": "after suite2"
      +    "size": {
      +      "height": 900
      +      "width": 900
      +    }
      +  }
      +  {
      +    "name": "before suite3"
      +    "size": {
      +      "height": 1000
      +      "width": 1000
      +    }
      +  }
      +  {
      +    "name": "in suite3"
      +    "size": {
      +      "height": 800
      +      "width": 800
      +    }
      +  }
      +  {
      +    "name": "before suite3.1"
      +    "size": {
      +      "height": 800
      +      "width": 800
      +    }
      +  }
      +  {
      +    "name": "in suite3.1"
      +    "size": {
      +      "height": 700
      +      "width": 700
      +    }
      +  }
      +  {
      +    "name": "after suite3.1"
      +    "size": {
      +      "height": 700
      +      "width": 700
      +    }
      +  }
      +  {
      +    "name": "after suite3"
      +    "size": {
      +      "height": 800
      +      "width": 800
      +    }
      +  }
      +  {
      +    "name": "after suite1"
      +    "size": {
      +      "height": 1000
      +      "width": 1000
      +    }
      +  }
      +]

      at Assertion.assert (node_modules/expect.js/index.js:96:13)
      at Assertion.eql (node_modules/expect.js/index.js:230:10)
      at Context.<anonymous> (test/functional/services/remote/__tests__/remote_default_window_size.js:42:40)
      at undefined.next (native)
      at step (test/functional/services/remote/__tests__/remote_default_window_size.js:11:191)
      at test/functional/services/remote/__tests__/remote_default_window_size.js:11:361
      at process._tickDomainCallback (internal/process/next_tick.js:135:7)




Warning: Task "simplemocha:all" failed. Use --force to continue.

Aborted due to warnings.
error An unexpected error occurred: "Command failed.
Exit code: 3
Command: sh
Arguments: -c grunt test
Directory: /home/ansible/kibana
Output:
".
info If you think this is a bug, please open a bug report with the information provided in "/home/ansible/kibana/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@tylersmalley
Copy link
Contributor

This is resolved.

@tylersmalley
Copy link
Contributor

@emgarcia try rebasing upstream - we changed the Chromedriver which was used which might have been the cause of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants