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

It takes a long time to finish the process after testing #4294

Open
Hydrair opened this issue Apr 9, 2024 · 2 comments
Open

It takes a long time to finish the process after testing #4294

Hydrair opened this issue Apr 9, 2024 · 2 comments

Comments

@Hydrair
Copy link

Hydrair commented Apr 9, 2024

What are you trying to achieve?

I'm trying to run a test.

What do you get instead?

After running the test, codecept takes a long time to quit the process. It does not matter if the test succeeds or fails. After the test runs are finished, it just stays at OK in ... or finished teardown hook with --verbose. This happens randomly, sometimes finishing fast, but more often lasting up to several minutes.

Provide console output if related. Use --verbose mode for more details.

  ✔ OK in 12663ms

    --- STARTED "after each" hook: After for "Scenario1" ---
    Emitted | provisioning.user.removed ([object Object])
    Emitted | provisioning.user.removed ([object Object])
    --- ENDED "after each" hook: After for "Scenario1" ---

  OK  | 1 passed   // 16s
    started teardown hook
    Emitted | provisioning.context.removed ([object Object])
    finished teardown hook


✨  Done in 316.64s.

Provide test source code if related
Happens randomly to all tests.

Details

  • CodeceptJS version: v3.5.3
  • NodeJS Version: v21.6.2
  • Operating System: Sonoma 14.2.1
  • puppeteer version: 20.8.2
  • Configuration file:
    (cut sensitive data)
module.exports.config = {
  tests: './tests/**/*_test.js',
  timeout: 90,
  output: './output/',
  helpers: {
    Puppeteer: {
      url: process.env.LAUNCH_URL,
      smartWait: 1000,
      waitForTimeout: Number(process.env.WAIT_TIMEOUT),
      browser: 'chrome',
      restart: true,
      windowSize: '1280x1024',
      uniqueScreenshotNames: true,
      timeouts: {
        script: 5000
      },
      chrome: {
        executablePath: process.env.CHROME_BIN,
        args: [
          '--disable-crash-reporter',
          '--disable-dev-shm-usage',
          '--disable-features=IsolateOrigins',
          '--disable-gpu',
          '--disable-notifications', // to disable native notification window on Mac OS,
          '--disable-print-preview',
          '--disable-setuid-sandbox',
          '--disable-site-isolation-trials',
          '--disable-web-security',
          process.env.HEADLESS === 'false' ? '' : `--headless=${process.env.HEADLESS}`,
          '--no-first-run',
          '--no-sandbox',
          '--no-zygote',
            `--unsafely-treat-insecure-origin-as-secure=${process.env.LAUNCH_URL}`
        ].concat((process.env.CHROME_ARGS || '').split(' '))
      },
      show: process.env.HEADLESS === 'false' || 'new',
      waitForNavigation: ['domcontentloaded', 'networkidle0']
    },
    MockRequestHelper: {
      require: '@codeceptjs/mock-request'
    }
  },
  async teardown () {
    const { contexts } = global.inject()
    for (const ctx of contexts.filter(ctx => ctx.id > 100)) {
      if (ctx.id !== 10) await ctx.remove().catch(e => console.error(e.message))
    }
  },

}
Copy link

github-actions bot commented Jul 9, 2024

This issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Jul 9, 2024
@Horsty80
Copy link
Contributor

I have "stale" process issue to, but i'm unable to determine why ?

Any help on this ✌️

@github-actions github-actions bot removed the stale label Aug 15, 2024
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