You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running the full test suite in Scala, test("rumor handler should process messages received in a rumor") fails, but when running only RumorHandlerSuite this test passes.
Expected behavior
We expect that tests shouldn't have dependencies and test("rumor handler should process messages received in a rumor") should succeed independently of previous tests
Fe1-Web (please include browser's names & version)
Fe2-Android (please specify if phone or emulation, and Android version)
Not applicable
Back-ends:
Be1-Go
Be2-Scala
Not applicable
Workaround
PoP System is still usable as usual, this issue only raises in tests. To still be able to test, failing test should be uncommented and run only `RumorHandlerSuite
Impact
This issue prevents two different tests suites from testing if the processing of messages received within a Rumor or GetMsgByIdAns is done correctly.
Possible root cause
Root cause comes from PublishSubscribe.buildGraph injection of reference for the dbActor. RumorHandlerSuitetries to reference a dbActor that was created within GetMessagesByIdResponseHandlerSuiteSystem, which fails because it was terminated. This reference comes from different handlers that rely on getDbActorReffrom PublishSubscribe. This injection is necessary to test that messages are handled correctly, but if done in two separate test suites, it seems that some classes still reference and old one.
The text was updated successfully, but these errors were encountered:
Reference from Db is shared between tests through objects handlers. final lazy val handlerInstance is created once, with first ActorSystem sharing its dbRef. This dbRef is then shared accross tests causing errors.
Creating a MessageRegistery calls ElectionHandler, RollcallHandler, SocialHandler and WitnessHandler . Once a call to this handler happens in one test, the instance is set and final for all test suites.
Description (Actual behavior)
When running the full test suite in Scala,
test("rumor handler should process messages received in a rumor")
fails, but when running onlyRumorHandlerSuite
this test passes.Expected behavior
We expect that tests shouldn't have dependencies and
test("rumor handler should process messages received in a rumor")
should succeed independently of previous testsHow to reproduce
RumorHandlerSuite
Version & Environment
This bug was reproduced on:
Front-ends:
Back-ends:
Workaround
PoP System is still usable as usual, this issue only raises in tests. To still be able to test, failing test should be uncommented and run only `RumorHandlerSuite
Impact
This issue prevents two different tests suites from testing if the processing of messages received within a
Rumor
orGetMsgByIdAns
is done correctly.Possible root cause
Root cause comes from PublishSubscribe.buildGraph injection of reference for the dbActor.
RumorHandlerSuite
tries to reference a dbActor that was created withinGetMessagesByIdResponseHandlerSuiteSystem
, which fails because it was terminated. This reference comes from different handlers that rely ongetDbActorRef
from PublishSubscribe. This injection is necessary to test that messages are handled correctly, but if done in two separate test suites, it seems that some classes still reference and old one.The text was updated successfully, but these errors were encountered: