zakaf / KDHC

KDHC
http://www.dongkeunlee.com
6 stars 0 forks source link

Fix race condition in webserver /news test #42

Open zakaf opened 6 years ago

zakaf commented 6 years ago

/news test case once in every few times and is suspected to be due to race condition.

Error Log:

1) KDHC Webserver /card /news it should GET all the news - checks for multiple keyword on one news:

  Uncaught AssertionError: expected [ '테스트키워드1' ] to have a length of 2 but got 1
  + expected - actual
  -1
  +2

  at chai.request.get.end (test/test.js:316:73)
  at Test.Request.callback (node_modules/superagent/lib/node/index.js:619:12)
  at node_modules/superagent/lib/node/index.js:795:18
  at IncomingMessage.<anonymous> (node_modules/superagent/lib/node/parsers/json.js:16:7)
  at endReadableNT (_stream_readable.js:1101:12)
  at process._tickCallback (internal/process/next_tick.js:152:19)
zakaf commented 6 years ago

Error log from https://travis-ci.org/ldkz2524/KDHC/jobs/338494091