Skip to content

Conversation

gurioh
Copy link

@gurioh gurioh commented Aug 6, 2025

What is this PR for?

The testRunNoteNonBlocking integration test in NotebookRestApiTest can enter an infinite loop when the Python interpreter fails to start. This happens because the interpreter cannot find the python executable, resulting in an IOException: error=2, No such file or directory.

The test uses httpPost with blocking=true, followed by p1.waitUntilFinished() to wait for the paragraph to complete. When the interpreter fails to start, the paragraph's status remains in a READY state instead of transitioning to ERROR. This causes waitUntilFinished() to wait indefinitely, as isTerminated() never returns true.

The fix is to modify the test logic to immediately check the paragraph's status after p1.waitUntilFinished(). By moving the assertEquals(Job.Status.FINISHED, p1.getStatus()) assertion to immediately after the wait call, the test will fail instantly if the paragraph's status is not FINISHED (e.g., ERROR). This prevents the test from proceeding to p2.waitUntilFinished() and avoids the infinite loop.

image image

What type of PR is it?

Bug Fix

Todos

What is the Jira issue?

*[ZEPPELIN-6238]

How should this be tested?

  • Strongly recommended: add automated unit tests for any new or changed behavior
  • Outline any manual steps to test the PR here.

Screenshots (if appropriate)

image

Questions:

  • Does the license files need to update? N
  • Is there breaking changes for older versions? N
  • Does this needs documentation? N

@ParkGyeongTae
Copy link
Contributor

Hello, thank you for your contribution!
Could you update the PR title to:
[ZEPPELIN-6238] Prevent infinite loop in NotebookRestApiTest due to interpreter startup failure
instead of the current one, Prevent infinite loop in NotebookRestApiTest due to interpreter startup failure?

@gurioh gurioh changed the title Prevent infinite loop in NotebookRestApiTest due to interpreter startup failure [ZEPPELIN-6238] Prevent infinite loop in NotebookRestApiTest due to interpreter startup failure Aug 8, 2025
@gurioh
Copy link
Author

gurioh commented Aug 8, 2025

I’ve updated it.
Thank you for the review.

@Reamer
Copy link
Contributor

Reamer commented Aug 8, 2025

The test is being tested by CI. I don't see any problems in the current master version.

Copy link
Contributor

@ParkGyeongTae ParkGyeongTae left a comment

Choose a reason for hiding this comment

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

I think this addition is useful, but I couldn’t reproduce the issue on my local machine. I’m using a MacBook Pro M4. Could you share what environment you were running when you saw this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants