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

Return message when database does not exists #472

Merged
merged 16 commits into from
Feb 15, 2019

Conversation

Asia95
Copy link

@Asia95 Asia95 commented Jan 29, 2019

When database for given company and project doesn't exists proper message is displayed.

Description

SuiteStausServlet returns status PROCESSING_ERROR and proper message when database doesn't exists

Motivation and Context

Closes #341

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have reviewed (and updated if needed) the documentation regarding this change

I hereby agree to the terms of the AET Contributor License Agreement.


/**
* @param dbKey - key with project and company name
* @return true when database for given dbKey exists
Copy link
Contributor

@tkaik tkaik Jan 29, 2019

Choose a reason for hiding this comment

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

It should probably return true also when the database does not exist but the allowAutoCreate flag is set to true :) Please update javadoc. Could you also create some unit tests for this method?

/**
* An error occured when accessing database.
*/
PROCESSING_ERROR,
Copy link
Contributor

Choose a reason for hiding this comment

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

If this status is only returned when the database does not exist (and can't be created), please rename it to e.g. MISSING_DATABASE

@plutasnyy
Copy link
Contributor

Please update a changelog ;)

@tkaik tkaik added the QA Required Requires manual tests, possible regression or impact on existing features. label Feb 8, 2019
@bambroziak
Copy link

Tested and accepted.
I've disabled automatic creation of database on AET MongoDB Client in Karaf.
Then I've rebuilded Integration env with branch changes.
Next I've runned AET suite with not existing company and project by aet.sh script on server.
Database was not created and test suite didin't get executed.

"No database found for company: 'companyname', project: 'projectname'." - result is displaying, which is expected. Without changes only timeout display.

QA Covered.

@tkaik tkaik merged commit 0bdccbf into wttech:master Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
QA Required Requires manual tests, possible regression or impact on existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suite status endpoint does not return proper message when DB does not exist
4 participants