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

Tests in github workflow failing [test_cell_speed_with_long_text] #923

Closed
RubendeBruin opened this issue Sep 13, 2023 · 5 comments
Closed

Comments

@RubendeBruin
Copy link

The test "test_cell_speed_with_long_text" sometimes fails due to a too long execution time.

The test is:

@ensure_exec_time_below(seconds=20)
@ensure_rss_memory_below(mib=1)
def test_cell_speed_with_long_text():  # issue #907
    pdf = FPDF()
    pdf.add_font(fname=FONTS_DIR / "DejaVuSans.ttf")
    pdf.set_font("DejaVuSans", size=5)
    pdf.add_page()
    assert len(LONG_TEXT_LINES) == 26862
    for line in LONG_TEXT_LINES:
        pdf.cell(0, 3, line, new_x="LMARGIN", new_y="NEXT")

and the resulting error is:

https://github.com/py-pdf/fpdf2/actions/runs/6171782769/job/16750710021?pr=797#step:10:1592https://github.com/py-pdf/fpdf2/actions/runs/6171782769/job/16750710021?pr=797#step:10:1592

image

Solving would be as simple as increasing the allowed execution, but that would also basically void the test.

@Lucas-C
Copy link
Member

Lucas-C commented Sep 13, 2023

Yes, you are right, I have also witnessed this 🙂

I think we could bump that to 21 seconds to improve the pipeline stability
while not sacrificing too much in terms of performance control.

@Lucas-C
Copy link
Member

Lucas-C commented Sep 29, 2023

I happened again:

But each time the execution time was above 21s, so my solution would not work...

@gmischler
Copy link
Collaborator

Can we please finally fix this?

I can see absolutely no value in blocking the pipeline just because something took longer than expected on some random system configuration. Rerunning all tests in the hope it might then succeed makes the problem worse, because it increases the total load on the cloud boxes hosting the virtual test systems even more.
I'm not mistaken, the "failed" tests also keep codecov from doing its job.

It would be completely sufficient to just measure the time taken and report the result.
I have no experience with the pipeline mechanics involved, or I'd do it myself...

@Lucas-C
Copy link
Member

Lucas-C commented Oct 30, 2023

I slightly increased the limits: 40d64d4

@Lucas-C
Copy link
Member

Lucas-C commented May 24, 2024

I believe this problem with test_cell_speed_with_long_text() did not happen again since I increased the limit.

Closing this for now, but feel free to reopen it, or to open another issue, if need be.

@Lucas-C Lucas-C closed this as completed May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants