Closed hsiaojietng closed 2 years ago
@hsiaojietng can I just check, do you get an error when you run ./gradlew test
(or what the Window's version is)? I'm asking because jacocoTestReport
just compiles the errors that went wrong, so I don't think that's the issue per se.
@yusufaine I ran everything under 'Verification' of gradle and all tests run successfully as shown
Test (with warnings but no errors):
Jacoco Test Report
Jacoco Test Coverage Verification
and Check (with warnings but not errors):
By the way, as you guys can see from the first screenshot, there are 250 tests passed and 1 failed. Locally, when I run test checks, it only shows 250 test passed and that the test runs successfully. As shown below: Really boggles my mind what is wrong
Hi, I think it's an error that arises when github tries to test your code after simulating the merge with master. The test you're having problem with is this:
seedu.address.logic.commands.EditCommandTest > execute_allFieldsSpecifiedUnfilteredList_success() FAILED
Check if there are any changes to this test from your team repo
@hsiaojietng I took a rough glance at your repo, you probably need to resolve the differences between your editedPerson
and your editPersonDescriptor
Hi @pyk595, thanks for the tip, really helped!
Please help, I really don't know what to do anymore.
I am facing the same issue, failing the test case seedu.address.logic.commands.EditCommandTest > execute_allFieldsSpecifiedUnfilteredList_success() FAILED
again but this time I thought I got it.
Basically, at first, the value for favourite
for descriptor object was Optional.empty()
and value for favourite
for editPersonDescriptor object was null
, therefore I thought changing that would solve the test.
But when I tried to re-run the workflow after pushing from my branch, it still shows the same test error as shown in this PR: https://github.com/AY2122S2-CS2103-W16-4/tp/pull/80.
This is the current version of the branch I am working on: https://github.com/hsiaojietng/tP/tree/add-favourite-feature
Please help this is really annoying that I don't even know what is wrong.
@hsiaojietng is it a case of 'passing locally but failing in CI'? In that case, ensure your local branch is synced with the latest master of the team repo, because GitHub merges the master branch to your branch before running the tests.
@damithc I just did but I'm still facing the same issue
Was this intended?
To sync a local branch with the upstream master,
Yup that was unintended, it has been reversed. I did the steps exactly but still failing that 1 test case execute_allFieldsSpecifiedUnfilteredList_success()
Yup that was unintended, it has been reversed. I did the steps exactly but still failing that 1 test case
execute_allFieldsSpecifiedUnfilteredList_success()
I see. You can push that code to your branch so that someone can try to look at the code and see what's wrong. In the meantime, you can use the following steps to try to locate the problem yourself.
Thanks @damithc, I have done those checks but still unable to find the problem. I was thinking of 1) Finding the first commit that might have failed and creating a detached head from that commit. 2) Try to locate the problem and solve it. 3) PR into the master branch to check if the CI workflow passes. 4) If so, I delete the PR, make the necessary changes to my latest favourite-feature branch and then PR into the master branch of the team repo. 5) Else, I continue checking by repeating the steps for the next commit until I reach the commit where I failed the CI workflow What do you think? PS. I am just afraid that doing so might cause some issues since I am unsure of how detached heads work.
Thanks @damithc, I have done those checks but still unable to find the problem. I was thinking of
- Finding the first commit that might have failed and creating a detached head from that commit.
- Try to locate the problem and solve it.
- PR into the master branch to check if the CI workflow passes.
- If so, I delete the PR, make the necessary changes to my latest favourite-feature branch and then PR into the master branch of the team repo.
- Else, I continue checking by repeating the steps for the next commit until I reach the commit where I failed the CI workflow What do you think? PS. I am just afraid that doing so might cause some issues since I am unsure of how detached heads work.
@hsiaojietng You can do the first 2 steps. Once you locate the problem, most likely you can go back to the normal branch HEAD and fix the problem there as the same problem is likely to be causing the problem even in the current HEAD commit.
Hi @damithc, I tried doing both step 1 and 2. I fixed the problems and PR into master branch of team repo but faced some minor checkstyle errors (guessing it's from when I did merging of conflicts since I did not encounter any errors locally). Is there any way to make edits to merge conflicts that I previously made changes to?
Hi @damithc, I tried doing both step 1 and 2. I fixed the problems and PR into master branch of team repo but faced some minor checkstyle errors (guessing it's from when I did merging of conflicts since I did not encounter any errors locally). Is there any way to make edits to merge conflicts that I previously made changes to?
@hsiaojietng you can run checkstyle locally with the gradlew verify
command (which includes checkstyle check as well). Once you find the error, you can fix it as a new commit (no need to edit the past commit).
Thanks, still having same test case failure in CI. Would you allow me to restart everything? (Create a new repo, forked from my current team repo, thus all existing commits of mine are gone?)
Thanks, still having same test case failure in CI. Would you allow me to restart everything? (Create a new repo, forked from my current team repo, thus all existing commits of mine are gone?)
There is no restriction against that. But note that we look at commit timestamps to determine your activity level in each week.
Thanks!
I am trying to fix some errors during integration.
These are some of the errors I face:
It shows that I have a test case that is failing, however, when I run test on gradle on my side, everything passes, really do not understand why I am failing that test case on EditCommand.
Similarly, for the JacocoTestReport, when I run it on my side, no errors at all, but this ambiguous error pops up when it is run as a CI workflow and I am not even sure how to solve this error as nothing is provided.
Please help! You can take a look at my code here