Skip to content

Backup Tests redo PR#5916

Merged
gearama merged 3 commits intoAzure:mainfrom
gearama:TestBackup
Aug 15, 2024
Merged

Backup Tests redo PR#5916
gearama merged 3 commits intoAzure:mainfrom
gearama:TestBackup

Conversation

@gearama
Copy link
Copy Markdown
Contributor

@gearama gearama commented Aug 15, 2024

PR(https://github.com/Azure/azure-sdk-for-cpp/pull/5888/files) got deleted before merging.
Thank you @ahsonkhan for catching it.
closes #5823
closes #5821

Pull Request Checklist

Please leverage this checklist as a reminder to address commonly occurring feedback when submitting a pull request to make sure your PR can be reviewed quickly:

See the detailed list in the contributing guide.

  • C++ Guidelines
  • Doxygen docs
  • Unit tests
  • No unwanted commits/changes
  • Descriptive title/description
    • PR is single purpose
    • Related issue listed
  • Comments in source
  • No typos
  • Update changelog
  • Not work-in-progress
  • External references or docs updated
  • Self review of PR done
  • Any breaking changes?

@gearama gearama enabled auto-merge (squash) August 15, 2024 22:47
@gearama gearama merged commit d609c00 into Azure:main Aug 15, 2024
@gearama gearama deleted the TestBackup branch August 15, 2024 23:27
Comment on lines +599 to +600
std::cout << std::endl << "retries reached 0";
EXPECT_TRUE(false);
Copy link
Copy Markdown
Contributor

@ahsonkhan ahsonkhan Aug 16, 2024

Choose a reason for hiding this comment

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

FYI: Another mechanism to add output messages for tests that fail, instead of cout, is use the gtest feature.

EXPECT_TRUE(<put condition here>) << <put your log message here>;

This way, you only output that error message if the test assertion fails.

You can also use: GTEST_LOG_INFO. We have a few places in test that do that already.

In cases like this, where you want to fail a test if it reaches this point, rather than using EXPECT_TRUE(false), you can see GTEST_FAIL with an output message appended to it

Here are a couple example usages of that:

GTEST_LOG_(ERROR) << "Response: " << bodyAsString;
GTEST_FAIL();

GTEST_FAIL() << "GetToken should have thrown an exception due to an invalid tenant ID.";

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

3 participants