You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by GitBox <gi...@apache.org> on 2022/12/19 09:45:29 UTC

[GitHub] [james-project] quantranhong1999 opened a new pull request, #1362: [BUILD] Fix unstable cassandra mapper tests

quantranhong1999 opened a new pull request, #1362:
URL: https://github.com/apache/james-project/pull/1362

   ## Why
   Recently, sometime we observed `java.lang.IllegalStateException: Session is closed` for Cassandra mapper tests in CI failed builds.
   
   Git bisect issued commit: https://github.com/apache/james-project/commit/746ca874aecfb5ea77679a081a32999471bbbce7
   
   Currently, for each test, `mapperProvider` is created before BeforeEachCallBack and BeforeEach lead to it sometime points to a closed CqlSession (when max tests e.g 500 played then Cassandra container restart -> close the old session and opens a new session). 
   
   Current flow for each mapper test: 
   create new final `mapperProvider` (refer to to-be-closed session) -> BeforeEachCallback (restarting Cassandra leads to closing the old session and creating a new session) -> BeforeEach (return the `mapperProvider`refers to closed session).
   
   ## How
   We need to let `mapperProvider` be created in BeforeEach to avoid referring to a closed session.
   
   Now the flow: 
   create a null `mapperProvider` -> BeforeEachCallback (restarting Cassandra leads to closing the old session and creating a new session) -> BeforeEach (set a new `mapperProvider` which always refers to the new session)
   
   ## DoD
   Builds after this should not throw `java.lang.IllegalStateException: Session is closed`.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org


[GitHub] [james-project] chibenwa merged pull request #1362: [BUILD] Fix unstable cassandra mapper tests

Posted by GitBox <gi...@apache.org>.
chibenwa merged PR #1362:
URL: https://github.com/apache/james-project/pull/1362


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org