[BUG]: Some tests on the LoggingIdentifierControllerTest file are false positives #5399
Labels
bug
End user-perceivable behaviors which are not desirable.
Impact: Medium
Moderate perceived user impact (non-blocking bugs and general improvements).
Work: Low
Solution is clear and broken into good-first-issue-sized chunks.
Describe the bug
Tests in the test file that involve restarting the app and checking if the value generated is the same will always pass because of how the test file is set up. The LoggingIdentifierControllerTest initializes with the applicationIdSeed of 1L and on restart, this is the same seed used to generate the IDs and as such, any ID generated with the same seed will always be the same. Tests affected by this issue include the;
Two new test also needs to be introduced to ensure that the ID generated for the sessionID and the appSessionId values change when the app is restarted.
Steps To Reproduce
N/A
Expected Behavior
I expect that when the app restart is simulated, the applicationSeedId should be varied or modified on the restart to ensure that generated IDs are not the same purely on the basis of being generated with the same seed ID but because the IDs are being cached by the app itself. In the instance of the appSessionId, the ID should be different on each app restart in the tests to test the expected behaviour of the ID.
Screenshots/Videos
No response
What device/emulator are you using?
No response
Which Android version is your device/emulator running?
No response
Which version of the Oppia Android app are you using?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: