Skip to content
This repository was archived by the owner on May 12, 2021. It is now read-only.

TAJO-1681 Fix TajoDump invalid null check for database name#628

Closed
charsyam wants to merge 2 commits intoapache:masterfrom
charsyam:feature/fix-bug-for-tajodump
Closed

TAJO-1681 Fix TajoDump invalid null check for database name#628
charsyam wants to merge 2 commits intoapache:masterfrom
charsyam:feature/fix-bug-for-tajodump

Conversation

@charsyam
Copy link
Contributor

isAcceptableDumpingDatabase return true even if databaseName is null
so it cause exception in dumpDatabase

@blrunner
Copy link
Contributor

Hi @charsyam

Could you rebase the patch against the master branch?

@charsyam charsyam force-pushed the feature/fix-bug-for-tajodump branch from 6e7f2b3 to e543907 Compare July 14, 2015 13:25
@charsyam
Copy link
Contributor Author

@blrunner I fixed bug and rebased it :) Thank you.

Copy link
Contributor

Choose a reason for hiding this comment

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

It would be nice if the dump result is verified. Please refer to other tests in this class.

@jihoonson
Copy link
Contributor

@charsyam, sorry for late review.
This patch looks good, but test seems to be improved.
Please consider my comment.

@charsyam
Copy link
Contributor Author

@jihoonson Thanks for your review :)
But this patch just check null point exception of null parameters.
and other 2 testcases check dump result is verified.

so I think this test is more intuitive.
and It can't get the result because test database name is null :)

What do you think?

@jihoonson
Copy link
Contributor

I got your point. As you said, the dump result doesn't have to be verified since this ticket is related to fix wrong null checking on database name.
If so, how about adding an error message when the given database name is wrong? I mean, isAcceptableDumpingDatabase() returns false, it would be better to print a message to notify users that something is going wrong. In addition, we can verify error handling with that message.

@charsyam
Copy link
Contributor Author

@jihoonson Thanks your review :), Yes, I think It is good idea.
but I still have a question about this behavior :)

Because isAcceptableDumpingDatabase's return value doesn't mean error.
it jsut check database name is not CatalogConstants.INFORMATION_SCHEMA_DB_NAME

What do you think?
but I found indent is wrong T.T I should fix it first :)

@jihoonson
Copy link
Contributor

Oh, right. It was my misunderstanding.
I still have a doubt whether the unit test verifies correctly.
How about removing the test? I think it's enough because this change is straightforward.

@charsyam charsyam force-pushed the feature/fix-bug-for-tajodump branch from e543907 to 94bc862 Compare July 27, 2015 03:55
@charsyam
Copy link
Contributor Author

@jihoonson Ok, I removed testcase and fix indent Thank you for your review :)

@jihoonson
Copy link
Contributor

+1. Thanks!

@asfgit asfgit closed this in ae9a8c9 Jul 28, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants