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

[SPARK-40828][CONNECT][PYTHON][TESTING] Drop Python test tables before and after unit tests #38293

Closed

Conversation

amaliujia
Copy link
Contributor

What changes were proposed in this pull request?

  1. Instead of random names, use fixed names for test tables.
  2. Try to drop test tables before and after unit tests.

Why are the changes needed?

Improve python client's testing framework.

Does this PR introduce any user-facing change?

NO

How was this patch tested?

UT

@amaliujia
Copy link
Contributor Author

R: @HyukjinKwon

You mentioned we should drop test tables.

@@ -74,7 +73,7 @@ def _udf_mock(cls, *args, **kwargs) -> str:
@classmethod
def setUpClass(cls: Any) -> None:
cls.connect = MockRemoteSession()
cls.tbl_name = f"tbl{uuid.uuid4()}".replace("-", "")
cls.tbl_name = "test_connect_plan_only_table_1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do not need to drop this because this table name works with MockRemoteSession. The table has never been created.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

Copy link
Contributor

@itholic itholic left a comment

Choose a reason for hiding this comment

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

Looks pretty good to me.

@HyukjinKwon
Copy link
Member

Merged to master.

SandishKumarHN pushed a commit to SandishKumarHN/spark that referenced this pull request Dec 12, 2022
…e and after unit tests

### What changes were proposed in this pull request?

1. Instead of random names, use fixed names for test tables.
2. Try to drop test tables before and after unit tests.

### Why are the changes needed?

Improve python client's testing framework.

### Does this PR introduce _any_ user-facing change?

NO
### How was this patch tested?

UT

Closes apache#38293 from amaliujia/python_testing_cleanup_table.

Authored-by: Rui Wang <rui.wang@databricks.com>
Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants