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

Add assertion in unit test of OpenmldbCatalogService #1317

Closed
tobegit3hub opened this issue Feb 25, 2022 · 3 comments · Fixed by #1803
Closed

Add assertion in unit test of OpenmldbCatalogService #1317

tobegit3hub opened this issue Feb 25, 2022 · 3 comments · Fixed by #1803
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tobegit3hub
Copy link
Collaborator

tobegit3hub commented Feb 25, 2022

Now the unit test of OpenmldbCatalogService is quite simple and lack of assertions. You can find the test code in https://github.com/4paradigm/OpenMLDB/blob/main/java/openmldb-batch/src/test/scala/com/_4paradigm/openmldb/batch/catalog/TestOpenmldbCatalogService.scala .

Now we can get all the table names from internal db. It would be better to add code in line 36 and check the table name like this using assertation.

val internalTableNames = List("JOB_INFO", "PRE_AGG_META_INFO")
assert(internalTableNames.contains(tables(i)))
@tobegit3hub tobegit3hub added enhancement New feature or request good first issue Good for newcomers labels Feb 25, 2022
@tobegit3hub
Copy link
Collaborator Author

Now we can get all the table names from internal db.

It would be better to add code in line 36 and check the table name like this.

val internalTableNames = List("JOB_INFO", "PRE_AGG_META_INFO")

assert(internalTableNames.contains(tables(i)))

@SaumyaBhushan
Copy link
Contributor

I would like to work on this issue.

@SaumyaBhushan
Copy link
Contributor

@tobegit3hub @lumianph I have raised a PR. Please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants