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

Fix random failure in WordContributionEventDaoTest #1645

Closed
jo-elimu opened this issue Feb 1, 2024 · 1 comment · Fixed by #1666
Closed

Fix random failure in WordContributionEventDaoTest #1645

jo-elimu opened this issue Feb 1, 2024 · 1 comment · Fixed by #1666
Assignees
Labels
good first issue Good for newcomers

Comments

@jo-elimu
Copy link
Member

jo-elimu commented Feb 1, 2024

The unit test at WordContributionEventDaoTest fails randomly, so it probably has something to do with the random execution order of the tests.

https://github.com/elimu-ai/webapp/actions/runs/7737336544/job/21096137074?pr=1643

[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.047 s - in ai.elimu.web.SignOnControllerWeb3Test
06:47:17.917 [SpringContextShutdownHook] INFO  org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default'
[INFO] 
[INFO] Results:
[INFO] 
Error:  Failures: 
Error:    WordContributionEventDaoTest.testReadMostRecentPerWord:111 
Expected: is <2>
     but: was <3>
[INFO] 
Error:  Tests run: 122, Failures: 1, Errors: 0, Skipped: 2

Relates to #1647

@jo-elimu
Copy link
Member Author

jo-elimu commented Feb 2, 2024

https://github.com/elimu-ai/webapp/actions/runs/7754162700/job/21146934845?pr=1646

09:50:52.[141](https://github.com/elimu-ai/webapp/actions/runs/7754162700/job/21146934845?pr=1646#step:7:142) [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - testReadMostRecentPerWord
09:50:52.141 [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - numberOfWordContributionEventsBefore: 0
09:50:52.157 [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - numberOfWordContributionEventsAfter: 1
09:50:52.172 [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - numberOfWordContributionEventsAfter: 2
09:50:52.188 [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - numberOfWordContributionEventsAfter: 3
09:50:52.188 [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - testReadMostRecent
09:50:52.204 [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - numberOfWordContributionEventsBefore: 3
09:50:52.219 [main] INFO  ai.elimu.dao.WordContributionEventDaoTest - numberOfWordContributionEventsAfter: 4
Error:  Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.109 s <<< FAILURE! - in ai.elimu.dao.WordContributionEventDaoTest
Error:  testReadMostRecentPerWord(ai.elimu.dao.WordContributionEventDaoTest)  Time elapsed: 0.063 s  <<< FAILURE!
java.lang.AssertionError: 

Expected: is <2>
     but: was <3>
	at ai.elimu.dao.WordContributionEventDaoTest.testReadMostRecentPerWord(WordContributionEventDaoTest.java:122)

jo-elimu added a commit that referenced this issue Jul 2, 2024
jo-elimu added a commit that referenced this issue Jul 3, 2024
jo-elimu added a commit that referenced this issue Jul 3, 2024
jo-elimu added a commit that referenced this issue Jul 4, 2024
jo-elimu added a commit that referenced this issue Jul 4, 2024
jo-elimu added a commit that referenced this issue Jul 5, 2024
jo-elimu added a commit that referenced this issue Jul 5, 2024
jo-elimu added a commit that referenced this issue Jul 5, 2024
@jo-elimu jo-elimu self-assigned this Jul 5, 2024
jo-elimu added a commit that referenced this issue Jul 5, 2024
jo-elimu added a commit that referenced this issue Jul 5, 2024
jo-elimu added a commit that referenced this issue Jul 5, 2024
Handle more than 10 items.

refs #1645
jo-elimu added a commit that referenced this issue Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
1 participant