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

Getting No moduleQueue was set when using load-balance #370

Open
makepanic opened this issue Sep 24, 2019 · 5 comments
Open

Getting No moduleQueue was set when using load-balance #370

makepanic opened this issue Sep 24, 2019 · 5 comments
Labels

Comments

@makepanic
Copy link

makepanic commented Sep 24, 2019

I've tried to use the load-balance option in our app, that's already using exam but got an execution error:

command:

ember exam --parallel=3 --load-balance

error:

throw new Error('No moduleQueue was set.')
    at TestemEvents.nextModuleResponse (/project/node_modules/ember-exam/lib/utils/testem-events.js:107:13)

packages:

    "ember-cli": "~3.12.0",
    "ember-exam": "^4.0.2",
    "ember-qunit": "^4.5.1",

test-helpers.ts:

// @ts-ignore
import Application from '../app';
import config from '../config/environment';
import { setApplication } from '@ember/test-helpers';
import start from 'ember-exam/test-support/start';
import 'qunit-dom';
import 'ember-cli-testdouble-qunit';

setApplication(Application.create(config.APP));

start();

I'm unsure how to debug this error.

@elwayman02
Copy link

We're seeing this error intermittently as well. Has anyone found a solution?

@step2yeung
Copy link
Collaborator

The load-balance feature works really well when there are a large number of tests.. but in the case of small ember repo eg. one that has 27 unit tests across 3 test file.. these tests runs super fast, and in some cases the tests finish before some browsers are instantiated... causing the "No moduleQueue was set" error

A short term fix is to decrease the number of browsers for repos with a small number of tests/test files eg: ember exam --load-balance --parallel=1 instead of ember exam --load-balance --parallel=16

Long term, we need implement a flag on testem/ember-exam to ignore the browsers that no longer has tests to run.

@step2yeung step2yeung added the bug label Sep 25, 2020
@ndekeister-us
Copy link

@step2yeung we also have this issue using [email protected] with a test suite having a lot of tests (more than 1100)

It happens randomly and we use the following command ember exam --split=2 --partition=1 --parallel=2 --load-balance

@ndekeister-us
Copy link

Sorry for the double post, after investigating a little and regarding your answer i'm not sure we got this error because the tests finish before some browsers are instantiated, in our case we are also logging an execution file via --write-execution-file option and in this file, when it fails, we can see the following data ->

{
  "numberOfBrowsers": 2,
  "failedBrowsers": [
    "2"
  ],
  "executionMapping": {
    "1": [
      ...more than 50 modules
    ],
    "2": [
      ...more than 30 modules
    ]
  }
}

So it seems that some tests are already executed in the second browser (or the data in the execution file can be incorrect?)

@pomm0
Copy link

pomm0 commented Feb 19, 2024

running into this quite often in a test suite with ~ 3.000 tests

ember exam --load-balance --parallel=7 --silent --reporter xunit --preserve-test-name > testem-alltests.xml.

ember-exam version 9.

It succeeds after a retry, so its very unfrequent and hard to reproduce.

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

5 participants