Skip to content

fix(amber): add temporary fixes for e2e tests in Amber - #3962

Merged
Xiao-zhen-Liu merged 7 commits into
mainfrom
xiaozhen-tentatively-fix-e2e-tests
Oct 22, 2025
Merged

Xiao-zhen-Liu merged 7 commits into
mainfrom
xiaozhen-tentatively-fix-e2e-tests

Conversation

@Xiao-zhen-Liu

@Xiao-zhen-Liu Xiao-zhen-Liu commented Oct 20, 2025 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

This PR adds temporary fixes for the occasional CI failures related to e2e test cases in Amber by doing the following:

  • Add a timeout for PauseSpec.
  • Add a retry for test cases in PauseSpec and DataProcessingSpec in the case of failure. We use Scalatest.retries, which retries a failed test once. If a test case succeeds after a retry, its outcome will be Canceled (this will still pass CIs).

Please refer to #3880 for details about the current problems with these two e2e tests.

Any related issues, documentation, discussions?

Resolves #3948 .

How was this PR tested?

Manually tested locally by setting the timeouts to be very short. The retry works. When a test case fails at first but succeeds on retry, it will show "Test Canceled: Test canceled because flickered: initially failed, but succeeded on retry".

Was this PR authored or co-authored using generative AI tooling?

No.

@chenlica

Copy link
Copy Markdown
Contributor

@aglinxinyuan Can you review it first?

@aglinxinyuan aglinxinyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@chenlica
chenlica requested review from Yicong-Huang and removed request for chenlica October 21, 2025 05:05
@chenlica

Copy link
Copy Markdown
Contributor

@Yicong-Huang Do you want to take a look as well?

@Yicong-Huang

Copy link
Copy Markdown
Contributor

Thanks for adding this temporary fix. Two comments:

  1. I see we are manually doing timeout and retry in test logic. There are standard libraries, such as Scalatest.retries. Can we use those standard library to make test more reliable instead of doing it manually?
  2. Please follow our PR template, you are missing some questions in the template. Especially the declaration of AI part is required by ASF on changes.

@Xiao-zhen-Liu

Copy link
Copy Markdown
Contributor Author

Thanks for adding this temporary fix. Two comments:

  1. I see we are manually doing timeout and retry in test logic. There are standard libraries, such as Scalatest.retries. Can we use those standard library to make test more reliable instead of doing it manually?
  2. Please follow our PR template, you are missing some questions in the template. Especially the declaration of AI part is required by ASF on changes.

@Yicong-Huang I updated the PR description to answer all the questions.

Regarding the retry implementation, you are right. Scalatest.retries is used exactly for flickery test cases that usually pass, but occasionally fail. I updated the implementation to use this instead. I tested manually by setting the timeout to be very short and the retry works. Note it only allows retry once (which should be enough for our case), and when a test case succeeds only on retry, its outcome will be Canceled, showing "Test Canceled: Test canceled because flickered: initially failed, but succeeded on retry".

@Xiao-zhen-Liu

Copy link
Copy Markdown
Contributor Author

Thanks for adding this temporary fix. Two comments:

  1. I see we are manually doing timeout and retry in test logic. There are standard libraries, such as Scalatest.retries. Can we use those standard library to make test more reliable instead of doing it manually?
  2. Please follow our PR template, you are missing some questions in the template. Especially the declaration of AI part is required by ASF on changes.

@Yicong-Huang I updated the PR description to answer all the questions.

Regarding the retry implementation, you are right. Scalatest.retries is used exactly for flickery test cases that usually pass, but occasionally fail. I updated the implementation to use this instead. I tested manually by setting the timeout to be very short and the retry works. Note it only allows retry once (which should be enough for our case), and when a test case succeeds only on retry, its outcome will be Canceled, showing "Test Canceled: Test canceled because flickered: initially failed, but succeeded on retry".

@Yicong-Huang if you agree with this new implementation we can merge the PR?

@Yicong-Huang

Copy link
Copy Markdown
Contributor

@Yicong-Huang if you agree with this new implementation we can merge the PR?

Sounds good. Thanks for taking care of the comments!

@Xiao-zhen-Liu
Xiao-zhen-Liu merged commit 3166752 into main Oct 22, 2025
@Xiao-zhen-Liu
Xiao-zhen-Liu deleted the xiaozhen-tentatively-fix-e2e-tests branch October 22, 2025 18:08
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
<!--
Thanks for sending a pull request (PR)! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
[Contributing to
Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
  2. Ensure you have added or run the appropriate tests for your PR
  3. If the PR is work in progress, mark it a draft on GitHub.
  4. Please write your PR title to summarize what this PR proposes, we 
    are following Conventional Commits style for PR titles as well.
  5. Be sure to keep the PR description updated to reflect all changes.
-->

### What changes were proposed in this PR?
<!--
Please clarify what changes you are proposing. The purpose of this
section
is to outline the changes. Here are some tips for you:
  1. If you propose a new API, clarify the use case for a new API.
  2. If you fix a bug, you can clarify why it is a bug.
  3. If it is a refactoring, clarify what has been changed.
  3. It would be helpful to include a before-and-after comparison using 
     screenshots or GIFs.
  4. Please consider writing useful notes for better and faster reviews.
-->

This PR adds temporary fixes for the occasional CI failures related to
e2e test cases in Amber by doing the following:
- Add a timeout for `PauseSpec`.
- Add a retry for test cases in `PauseSpec` and `DataProcessingSpec` in
the case of failure. We use
[Scalatest.retries](https://www.scalatest.org/scaladoc/3.0.9/org/scalatest/Retries.html),
which retries a failed test once. If a test case succeeds after a retry,
its outcome will be `Canceled` (this will still pass CIs).

Please refer to apache#3880 for details about the current problems with these
two e2e tests.

### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned
already.
1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves
apache#1234`
or `Closes apache#1234`. If it is only related, simply mention the issue
number.
  2. If there is design documentation, please add the link.
  3. If there is a discussion in the mailing list, please add the link.
-->

Resolves apache#3948 .


### How was this PR tested?

Manually tested locally by setting the timeouts to be very short. The
retry works. When a test case fails at first but succeeds on retry, it
will show "Test Canceled: Test canceled because flickered: initially
failed, but succeeded on retry".

### Was this PR authored or co-authored using generative AI tooling?
No.
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
<!--
Thanks for sending a pull request (PR)! Here are some tips for you:
1. If this is your first time, please read our contributor guidelines:
[Contributing to
Texera](https://github.com/apache/texera/blob/main/CONTRIBUTING.md)
  2. Ensure you have added or run the appropriate tests for your PR
  3. If the PR is work in progress, mark it a draft on GitHub.
  4. Please write your PR title to summarize what this PR proposes, we 
    are following Conventional Commits style for PR titles as well.
  5. Be sure to keep the PR description updated to reflect all changes.
-->

### What changes were proposed in this PR?
<!--
Please clarify what changes you are proposing. The purpose of this
section
is to outline the changes. Here are some tips for you:
  1. If you propose a new API, clarify the use case for a new API.
  2. If you fix a bug, you can clarify why it is a bug.
  3. If it is a refactoring, clarify what has been changed.
  3. It would be helpful to include a before-and-after comparison using 
     screenshots or GIFs.
  4. Please consider writing useful notes for better and faster reviews.
-->

This PR adds temporary fixes for the occasional CI failures related to
e2e test cases in Amber by doing the following:
- Add a timeout for `PauseSpec`.
- Add a retry for test cases in `PauseSpec` and `DataProcessingSpec` in
the case of failure. We use
[Scalatest.retries](https://www.scalatest.org/scaladoc/3.0.9/org/scalatest/Retries.html),
which retries a failed test once. If a test case succeeds after a retry,
its outcome will be `Canceled` (this will still pass CIs).

Please refer to apache#3880 for details about the current problems with these
two e2e tests.

### Any related issues, documentation, discussions?
<!--
Please use this section to link other resources if not mentioned
already.
1. If this PR fixes an issue, please include `Fixes apache#1234`, `Resolves
apache#1234`
or `Closes apache#1234`. If it is only related, simply mention the issue
number.
  2. If there is design documentation, please add the link.
  3. If there is a discussion in the mailing list, please add the link.
-->

Resolves apache#3948 .


### How was this PR tested?

Manually tested locally by setting the timeouts to be very short. The
retry works. When a test case fails at first but succeeds on retry, it
will show "Test Canceled: Test canceled because flickered: initially
failed, but succeeded on retry".

### Was this PR authored or co-authored using generative AI tooling?
No.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Need temporary fix for e2e test case time-outs in Amber

4 participants