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

Reporter's onSpecComplete is called after onRunComplete #1292

Open
segrey opened this issue Jan 28, 2015 · 9 comments
Open

Reporter's onSpecComplete is called after onRunComplete #1292

segrey opened this issue Jan 28, 2015 · 9 comments

Comments

@segrey
Copy link
Contributor

segrey commented Jan 28, 2015

Reproduced on this test.js:

function wait(millis) {
  var startTime = new Date().getTime();
  while (new Date().getTime() < startTime + millis) {}
}

describe("suite", function () {
  it("wait 1 sec", function () {
    wait(1000);
  });
  it("wait 11 sec", function () {
    wait(11000);
  });
  it("wait 1 sec again", function () {
    wait(1000);
  });
});

Test wait 11 sec takes 11 sec to execute, so the browser is disconnected:

WARN [Chrome 38.0.2125 (Linux)]: Disconnected (1 times), because no message in 10000 ms.

The problem is that, for some reason, onSpecComplete is called after onRunComplete.
Is it expected or a bug?

@segrey segrey changed the title ReporteronSpecComplete is called after onRunComplete Reporter's onSpecComplete is called after onRunComplete Jan 28, 2015
@segrey segrey changed the title Reporter's onSpecComplete is called after onRunComplete Reporter's onSpecComplete is called after onRunComplete Jan 28, 2015
segrey added a commit to karma-runner/karma-intellij that referenced this issue Jan 28, 2015
SergeyZh pushed a commit to JetBrains/intellij-plugins that referenced this issue Jan 28, 2015
SergeyZh pushed a commit to JetBrains/intellij-plugins that referenced this issue Jan 30, 2015
(cherry picked from commit 8e3cdcf)
@dignifiedquire
Copy link
Member

This is a bug and mentioned somewhere else I just can't find the issue right now.

@dignifiedquire
Copy link
Member

dignifiedquire commented Jul 26, 2016

This should be fixed by 9c894f9

@joscha
Copy link

joscha commented Jul 26, 2016

nice @dignifiedquire!

@stramel
Copy link

stramel commented Aug 1, 2016

@dignifiedquire I still seem to be getting this intermittently. :/

@alt-grr
Copy link

alt-grr commented Sep 1, 2016

Fixed for me on version 1.2.0 🎉

@kayneb
Copy link

kayneb commented Sep 1, 2016

Should this now be closed?

Edit: Actually, we are still getting this intermittently too.

@svieira
Copy link

svieira commented Sep 6, 2016

Still seeing it here - [email protected] and [email protected]

@wesleycho
Copy link
Member

The karma-junit-reporter problem should be fixed in the 1.2.0 release of karma-junit-reporter, but this problem at its root is still present it sounds like.

@nemoDreamer
Copy link

nemoDreamer commented Apr 4, 2017

Still getting the issue in onBrowserComplete, left a note in karma-runner/karma-junit-reporter#61

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

No branches or pull requests

9 participants