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

Flaky Node-API library integration tests #7626

Closed
janpio opened this issue Jun 12, 2021 · 2 comments
Closed

Flaky Node-API library integration tests #7626

janpio opened this issue Jun 12, 2021 · 2 comments
Assignees
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: node-api formerly `nApi` topic: tests

Comments

@janpio
Copy link
Member

janpio commented Jun 12, 2021

For example:

FAIL src/__tests__/integration/happy/disconnect-while-query/test.ts
  ✕ disconnect-while-query (880 ms)

  ● disconnect-while-query


    Invalid `prisma.user.findMany()` invocation in
    /home/runner/work/prisma/prisma/src/packages/client/src/__tests__/integration/happy/disconnect-while-query/test.ts:8:25

       5 const prisma = new PrismaClient()
       6 
       7 await prisma.user.findMany()
    →  8 const a = prisma.user.findMany(
      Engine is not yet connected.
       0: user_facing_errors::Error::new_non_panic_with_current_backtrace
       1: query_engine_napi::error::<impl core::convert::From<query_engine_napi::error::ApiError> for user_facing_errors::Error>::from
       2: query_engine_napi::error::<impl core::convert::From<query_engine_napi::error::ApiError> for napi::error::Error>::from
       3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
       4: tokio::runtime::task::core::CoreStage<T>::poll
       5: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
       6: tokio::runtime::task::harness::poll_future
       7: tokio::runtime::task::harness::Harness<T,S>::poll
       8: std::thread::local::LocalKey<T>::with
       9: tokio::runtime::thread_pool::worker::Context::run_task
      10: tokio::runtime::thread_pool::worker::Context::run
      11: tokio::macros::scoped_tls::ScopedKey<T>::set
      12: tokio::runtime::thread_pool::worker::run
      13: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
      14: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
      15: tokio::runtime::task::harness::Harness<T,S>::poll
      16: tokio::runtime::blocking::pool::Inner::run
      17: std::sys_common::backtrace::__rust_begin_short_backtrace
      18: core::ops::function::FnOnce::call_once{{vtable.shim}}
      19: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once

      at ../../../../../../../../rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/alloc/src/boxed.rs:1521:9
            <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
      at ../../../../../../../../rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/alloc/src/boxed.rs:1521:9
            std::sys::unix::thread::Thread::new::thread_start
      at ../../../../../../../../rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/sys/unix/thread.rs:71:17
        20: start_thread
        21: clone
      at cb (src/runtime/PrismaClientFetcher.ts:172:17)

or

FAIL src/__tests__/integration/happy/disconnect-race/test.ts
  ✕ disconnect-race (1767 ms)

  ● disconnect-race


    Invalid `prisma.user.findMany()` invocation in
    /home/runner/work/prisma/prisma/src/packages/client/src/__tests__/integration/happy/disconnect-race/test.ts:9:31

       6 
       7 await prisma.user.findMany()
       8 prisma.$disconnect()
    →  9 const a = await prisma.user.findMany(
      Engine is not yet connected.
       0: user_facing_errors::Error::new_non_panic_with_current_backtrace
       1: query_engine_napi::error::<impl core::convert::From<query_engine_napi::error::ApiError> for user_facing_errors::Error>::from
       2: query_engine_napi::error::<impl core::convert::From<query_engine_napi::error::ApiError> for napi::error::Error>::from
       3: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
       4: tokio::runtime::task::core::CoreStage<T>::poll
       5: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
       6: tokio::runtime::task::harness::poll_future
       7: tokio::runtime::task::harness::Harness<T,S>::poll
       8: std::thread::local::LocalKey<T>::with
       9: tokio::runtime::thread_pool::worker::Context::run_task
      10: tokio::runtime::thread_pool::worker::Context::run
      11: tokio::macros::scoped_tls::ScopedKey<T>::set
      12: tokio::runtime::thread_pool::worker::run
      13: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
      14: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
      15: tokio::runtime::task::harness::Harness<T,S>::poll
      16: tokio::runtime::blocking::pool::Inner::run
      17: std::sys_common::backtrace::__rust_begin_short_backtrace
      18: core::ops::function::FnOnce::call_once{{vtable.shim}}
      19: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once

      at ../../../../../../../../rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/alloc/src/boxed.rs:1521:9
            <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
      at ../../../../../../../../rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/alloc/src/boxed.rs:1521:9
            std::sys::unix::thread::Thread::new::thread_start
      at ../../../../../../../../rustc/2fd73fabe469357a12c2c974c140f67e7cdd76d0/library/std/src/sys/unix/thread.rs:71:17
        20: start_thread
        21: clone
      at cb (src/runtime/PrismaClientFetcher.ts:172:17)

via: https://github.com/prisma/prisma/pull/7601/checks?check_run_id=2809813499

@janpio janpio added the topic: node-api formerly `nApi` label Jun 12, 2021
@janpio
Copy link
Member Author

janpio commented Jun 12, 2021

And some more via internal Slack: https://prisma-company.slack.com/archives/C02232M9CP8/p1623346549042300
Possibly related: #7569

@janpio janpio added bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. labels Jun 12, 2021
@janpio janpio changed the title Flaky Node-API library tests Flaky Node-API library integration tests Jun 15, 2021
@janpio
Copy link
Member Author

janpio commented Jun 18, 2021

Duplicate of #7569

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/1-unconfirmed Bug should have enough information for reproduction, but confirmation has not happened yet. kind/bug A reported bug. topic: node-api formerly `nApi` topic: tests
Projects
None yet
Development

No branches or pull requests

2 participants