Skip to content

Failing component test #13173

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

Open
weiquu opened this issue Sep 2, 2024 · 2 comments · May be fixed by #13257
Open

Failing component test #13173

weiquu opened this issue Sep 2, 2024 · 2 comments · May be fixed by #13257
Labels
a-Testing Testing-related traits such as efficiency, robustness, coverage p.High Significant impact; would like to do in the next few releases

Comments

@weiquu
Copy link
Contributor

weiquu commented Sep 2, 2024

The SearchAccountRequestsActionTest has suddenly started failing... did a quick check and couldn't find any recent code change that caused it. The tests are failing due to this error: java.lang.IllegalArgumentException: UUID string too large, from the same method. Example stack trace:

java.lang.IllegalArgumentException: UUID string too large
	at java.util.UUID.fromString(UUID.java:199)
	at teammates.storage.sqlsearch.AccountRequestSearchManager.getEntityFromDocument(AccountRequestSearchManager.java:39)
	at teammates.storage.sqlsearch.AccountRequestSearchManager.getEntityFromDocument(AccountRequestSearchManager.java:19)
	at teammates.storage.sqlsearch.SearchManager.convertDocumentToEntities(SearchManager.java:220)
	at teammates.storage.sqlsearch.AccountRequestSearchManager.searchAccountRequests(AccountRequestSearchManager.java:56)
	at teammates.storage.sqlapi.AccountRequestsDb.searchAccountRequestsInWholeSystem(AccountRequestsDb.java:187)
	at teammates.sqllogic.core.AccountRequestsLogic.searchAccountRequestsInWholeSystem(AccountRequestsLogic.java:182)
	at teammates.sqllogic.api.Logic.searchAccountRequestsInWholeSystem(Logic.java:1712)
	at teammates.ui.webapi.SearchAccountRequestsAction.execute(SearchAccountRequestsAction.java:24)
	at teammates.ui.webapi.SearchAccountRequestsAction.execute(SearchAccountRequestsAction.java:16)
	at teammates.ui.webapi.BaseActionTest.getJsonResult(BaseActionTest.java:571)
	at teammates.ui.webapi.BaseActionTest.getJsonResult(BaseActionTest.java:561)
	at teammates.ui.webapi.SearchAccountRequestsActionTest.testExecute_searchName_shouldSucceed(SearchAccountRequestsActionTest.java:94)
	...

Might be related to this PR, but needs more investigation: #12950. Could also be a setup issue on the database or data bundle side.

Putting as p.High since we should really ensure all tests are passing...

@weiquu weiquu added p.High Significant impact; would like to do in the next few releases a-Testing Testing-related traits such as efficiency, robustness, coverage labels Sep 2, 2024
This was referenced Sep 2, 2024
@jasonqiu212
Copy link
Contributor

jasonqiu212 commented Feb 16, 2025

After further investigation, the IllegalArgumentException comes from Line 39 of AccountRequestSearchManager.java.

UUID id = UUID.fromString((String) document.getFieldValue("id"));

document.getFieldValue("id") returns a String like "instr1@course1.tmt%TEAMMATES Test Institute 1", which seems like a concatenation of email and institute. Since it's not a UUID, the above exception will be thrown.

It seems like the SolrDocument ID is a concatenation of email and institute, but the AccountRequest entity ID is a UUID

@jasonqiu212
Copy link
Contributor

jasonqiu212 commented Mar 5, 2025

Something odd I observed is that SearchAccountRequestsActionTest only fails when I run it on its own (i.e., ./gradlew unitTests --tests teammates.ui.webapi.SearchAccountRequestsActionTest)

Image

When I run all of the backend component tests together (i.e., ./gradlew componentTests --continue), the test passes:

Image

This may be related to why the component tests on the GitHub CI pass

@jasonqiu212 jasonqiu212 linked a pull request Mar 6, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Testing Testing-related traits such as efficiency, robustness, coverage p.High Significant impact; would like to do in the next few releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants