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

Memory leak detector test doesn't run #47

Closed
joshuaswift opened this issue Sep 14, 2021 · 6 comments
Closed

Memory leak detector test doesn't run #47

joshuaswift opened this issue Sep 14, 2021 · 6 comments

Comments

@joshuaswift
Copy link

joshuaswift commented Sep 14, 2021

Hey! We can't get the detector to run in our tests locally or on CI, however we don't see any errors.
The test to check for retained classes just never seems to run in the first place.
If I run a small acceptance test module, the tests pass and there is no console output, from my understanding even if there is no retained classes there should be a console output, is that correct?

I did spot a QUnit warning which could potentially be related, which points to this line in the package.

Warning: Unexpected test after runEnd. This is unstable and will fail in QUnit 3.0.

This could well be something config related so here's our testem file, hopefully this helps:

Thanks!

const TimeReporter = require('testem-time-reporter');
const XunitReporter = require('testem/lib/reporters/xunit_reporter');

class Reporters {
  constructor(silent, out) {
    this.xunitReporter = new XunitReporter(silent, out, {get: () => false});
    this.timeReporter = new TimeReporter();
  }

  report(prefix, data) {
    this.xunitReporter.report(prefix, data);
    this.timeReporter.report(prefix, data);
  }

  finish() {
    this.xunitReporter.finish();
    this.timeReporter.finish();
  }
}

/* eslint-env node */
module.exports = {
  framework: 'qunit',
  test_page: 'tests/index.html',
  disable_watching: true,
  reporter: Reporters,
  report_file: './reports/test-results.xml',
  xunit_intermediate_output: true,
  launch_in_ci: ['Chrome'],
  launch_in_dev: ['Chrome'],
  parallel: 8,
  browser_args: {
    Chrome: {
      dev: ['--remote-debugging-port=9222'],
      ci: [
        '--disable-dev-shm-usage',
        '--disable-gpu',
        '--disable-software-rasterizer',
        '--disable-web-security',
        '--headless',
        '--incognito',
        '--mute-audio',
        '--no-sandbox',
        '--remote-debugging-address=0.0.0.0',
        '--remote-debugging-port=9222',
      ],
    },
  },
};
@joshuaswift joshuaswift changed the title Memory leak detector doesn't run Memory leak detector test doesn't run Sep 14, 2021
@steveszc
Copy link
Owner

@joshuaswift Thanks for reporting. This Qunit warning recently came to my attention and will require some pretty substantial changes to how we report memory leaks since we rely on adding a new test after all the other tests finish. I'm not sure I have a good answer for you now, but I suspect you may be out of luck unless you downgrade qunit or we can release a new version that uses a different approach.

What version of Qunit are you using?

@steveszc
Copy link
Owner

Context: Qunit changes introduced July 2021 here qunitjs/qunit#1629

@steveszc
Copy link
Owner

Closing in favor of #49

@joshuaswift
Copy link
Author

@steveszc Thanks for getting back to me! We're on ember-qunit 4.6.0 which appears to use qunit 2.9.3.

Sounds like a tricky obstacle to overcome! We can look into downgrading in the mean time.

@steveszc
Copy link
Owner

Fortunately it sounds like the qunit team agrees our use case should be supported, so it may end up being a straightforward change to whatever the new way to run a "final" test is.

@joshuaswift
Copy link
Author

Awesome! I look forward to further updates.

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

2 participants