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

timeout error with jasmine #3

Open
jkvim opened this issue Apr 18, 2016 · 0 comments
Open

timeout error with jasmine #3

jkvim opened this issue Apr 18, 2016 · 0 comments

Comments

@jkvim
Copy link

jkvim commented Apr 18, 2016

problem:

when use fibula with jasmine it cause timeout error. it always fail when jasmine timeout limit is 5s, when i set the timeout limit to 25s, it will not throw timeout error anymore, after checked the database log, it seems because build indexes take times and block the query operation.

but this problem seems should not be belong to fibula.js, because mongodb build indexes when jasmine initialize the app .

database:

mongodb 3.2.1

error message:

Error: Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

test case code:

 describe('coin-update', function() {
  "use strict";

  const app = require('self-ref');
  const fixtures = require('fibula');
  const Coin = app.models.Coin;
  var   timestamp;

  beforeEach(function () {
    fixtures.use('coin-update');
  });

  it('should update coin', function(next) {
    Coin.findById('coin')
      .then((coin) => {
         expect(coin.userId).toBe('helloworld');  
         next();
      })
    });
});
@jkvim jkvim changed the title bug: timeout error with jasmine timeout error with jasmine Apr 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant