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

Detox can't handle in case I run a suite containing many tests #4693

Open
1 task done
davitebralidze opened this issue Jan 30, 2025 · 0 comments
Open
1 task done

Detox can't handle in case I run a suite containing many tests #4693

davitebralidze opened this issue Jan 30, 2025 · 0 comments

Comments

@davitebralidze
Copy link

davitebralidze commented Jan 30, 2025

What happened?

I'm receiving the next error when running tests:

12:39:54.669 detox[85916] i The app is busy with the following tasks:
• The event "Runloop Perform Block" is taking place with object: "Main Run Loop".
• Run loop "Main Run Loop" is awake.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".

My test file looks this way:

describe('Add Routine screen', () => {

    let profileID: string;

    beforeAll(async () => {
      profileID = await mutation.createProfileWithoutRoleAndReturnProfileId();
    })

    afterAll(async () => {
      await device.terminateApp();
      await mutation.deleteProfile(profileID);
    })

    beforeEach(async () => {
      await device.launchApp({newInstance: true});
      await waitFor(LoginScreen.logInButton).toBeVisible().withTimeout(10000);
      await LoginScreen.clickOnLogInButton();
      await ProfileSelectionScreen.selectProfileById(profileID);
      await HomeScreen.pageView.swipe('up');
      await HomeScreen.clickOnAddRoutineButton();
    }, 30 * 10000);

   /* Test cases */

}

The error only occurs randomly, sometimes after 20 tests, sometimes even on a first try, and the thing I notice is that it executes beforeEach and the test does not run after

Also, should I use detox.init()? I could not find specific info on how or where to use it..

What was the expected behavior?

No response

Was it tested on the latest Detox?

  • I have tested this issue on the latest Detox release and it still reproduces.

Help us reproduce this issue!

No response

In what environment did this happen?

Detox version: 20.27.5
React Native version: 0.75.4
Has Fabric (React Native's new rendering system) enabled: (yes/no)
Node version: 22.8.1
Test-runner (select one): jest

Detox logs

Detox logs
12:39:54.669 detox[85916] i The app is busy with the following tasks:
• The event "Runloop Perform Block" is taking place with object: "Main Run Loop".
• Run loop "Main Run Loop" is awake.
• There are 1 work items pending on the dispatch queue: "Main Queue (<OS_dispatch_queue_main: com.apple.main-thread>)".```

</details>

### Device logs

<details><summary>Device logs</summary>

paste logs here!


</details>

### More data, please!

_No response_
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

1 participant