Skip to content

Live test framework#608

Merged
weshaggard merged 6 commits intomasterfrom
live-test-framework
Nov 5, 2020
Merged

Live test framework#608
weshaggard merged 6 commits intomasterfrom
live-test-framework

Conversation

@danieljurek
Copy link
Copy Markdown
Member

No description provided.

@Jinming-Hu
Copy link
Copy Markdown
Member

Jinming-Hu commented Sep 9, 2020

Hi @danieljurek , some storage unittest cases require additional configuration for the storage account. Some case has a bug (FileShareServiceClientTest.SetProperties). Can we skip these test cases with some command line arguments to ctest to unblock our release?

I disabled test cases for Blob Tags. Please rebase on top of latest master branch.

@danieljurek
Copy link
Copy Markdown
Member Author

Skipping tests should be done in the test code so it's clear every time tests run that a test is being skipped. Most test frameworks have a concept of "skipped" as a result for a single test. If we start excluding things in the CI then it makes CI more complex and fragile and makes it difficult for outside contributors to know which tests are not expected to pass.

@Jinming-Hu
Copy link
Copy Markdown
Member

Skipping tests should be done in the test code so it's clear every time tests run that a test is being skipped. Most test frameworks have a concept of "skipped" as a result for a single test. If we start excluding things in the CI then it makes CI more complex and fragile and makes it difficult for outside contributors to know which tests are not expected to pass.

I meant disabling some test cases as a workaround, a temporary solution, given we cannot get all test cases passed for now and the release date is so tight.

@danieljurek danieljurek marked this pull request as ready for review September 17, 2020 23:17
Copy link
Copy Markdown
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

Looks reasonable.

@RickWinter RickWinter added EngSys This issue is impacting the engineering system. Central-EngSys This issue is owned by the Engineering System team. labels Sep 25, 2020
@weshaggard
Copy link
Copy Markdown
Member

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Oct 10, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft katmsft force-pushed the live-test-framework branch from 4e7502f to 9c0d913 Compare October 10, 2020 05:13
@katmsft
Copy link
Copy Markdown
Member

katmsft commented Oct 10, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@ahsonkhan ahsonkhan added this to the [2020] November milestone Oct 10, 2020
@katmsft katmsft force-pushed the live-test-framework branch from 9c0d913 to d5e5c86 Compare October 12, 2020 08:14
@katmsft
Copy link
Copy Markdown
Member

katmsft commented Oct 12, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Oct 30, 2020

Pending on #872 to be fully functional.

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Oct 30, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@vhvb1989
Copy link
Copy Markdown
Member

The test cases are reusing the same http connections.
We should run each test independently (that's how I updated azure core)
Each test should be expected to be an independent case of creating a connection, creating a client and running the test.

Having one single client to run all tests makes tests interfere between them and there could be always some intermittent issues. Like, if a test pass but let the storage client in some specific state that the next test is not expecting.
And when using curl, ech curl connection will be in a pool to be re-used. The server is more likely to close a connection when the channel have been open for a long time (then the retry policy will help us, but what if it does not).

I guess, if you really expect to create this relation between tests cases is fine, but I think that's not a good unit testing model.

When adding ctests, you can just use gtest_add_tests instead of add_gtest and gtest would create one unique test for each of your tests. (see azure core: https://github.com/Azure/azure-sdk-for-cpp/blob/master/sdk/core/azure-core/test/ut/CMakeLists.txt#L45)

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 2, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft katmsft force-pushed the live-test-framework branch from 0322abb to 20fc92b Compare November 2, 2020 02:19
@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 2, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 2, 2020

The test cases are reusing the same http connections.
We should run each test independently (that's how I updated azure core)
Each test should be expected to be an independent case of creating a connection, creating a client and running the test.

Having one single client to run all tests makes tests interfere between them and there could be always some intermittent issues. Like, if a test pass but let the storage client in some specific state that the next test is not expecting.
And when using curl, ech curl connection will be in a pool to be re-used. The server is more likely to close a connection when the channel have been open for a long time (then the retry policy will help us, but what if it does not).

I guess, if you really expect to create this relation between tests cases is fine, but I think that's not a good unit testing model.

When adding ctests, you can just use gtest_add_tests instead of add_gtest and gtest would create one unique test for each of your tests. (see azure core: https://github.com/Azure/azure-sdk-for-cpp/blob/master/sdk/core/azure-core/test/ut/CMakeLists.txt#L45)

I created #890 to track this. We can discuss it there.

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 2, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft katmsft force-pushed the live-test-framework branch from 20fc92b to c082ccd Compare November 2, 2020 03:04
@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 2, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 2, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 2, 2020

/azp run cpp - storage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@weshaggard
Copy link
Copy Markdown
Member

/azp run cpp - core

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@weshaggard
Copy link
Copy Markdown
Member

@katmsft looks like the storage tests are now passing. Is this ready to get merged?

@katmsft
Copy link
Copy Markdown
Member

katmsft commented Nov 5, 2020

@katmsft looks like the storage tests are now passing. Is this ready to get merged?

Yes, sorry, emailed you about the PR being ready but not caught this comment. Thanks for checking.

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

Labels

Central-EngSys This issue is owned by the Engineering System team. EngSys This issue is impacting the engineering system.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants