-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update Web Pub Sub test recordings #35848
Merged
Merged
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
42c3e72
Add opens for testing so it does not fail.
conniey 13978fa
Add bicep script so resources are created for live tests.
conniey 09197f3
Consolidate common properties.
conniey 538a50a
Do not record test token generation because there are no network calls.
conniey 15fad92
Update WebPubSubServiceClientTests
conniey 11ef648
Add async client tests.
conniey 1e1b669
Update pom.xml to remove suppression for line coverage.
conniey 8840c49
Extends from TEstProxyTestBase.
conniey 1ed885b
Re-run test recordings.
conniey 6080bc4
Add new tests for recordings.
conniey 32cbe06
Do not record non-network tests.
conniey 5593533
update test credential
conniey b29922a
Fix recording issue.
conniey 5e34ddf
Fixing checkstyle issues
conniey 577a11c
Push assets.
conniey 0127dd6
Removing unnecessary comments.
conniey 1c40150
Removing pom.xml comments.
conniey f4d7487
Modify to use switch statements.
conniey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"AssetsRepo": "Azure/azure-sdk-assets", | ||
"AssetsRepoPrefixPath": "java", | ||
"TagPrefix": "java/webpubsub/azure-messaging-webpubsub", | ||
"Tag": "java/webpubsub/azure-messaging-webpubsub_2c7e99b063" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...bsub/azure-messaging-webpubsub/src/test/java/com/azure/messaging/webpubsub/TestUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
package com.azure.messaging.webpubsub; | ||
|
||
import com.azure.core.http.HttpClient; | ||
import com.azure.core.http.policy.FixedDelayOptions; | ||
import com.azure.core.http.policy.RetryOptions; | ||
import com.azure.core.test.http.AssertingHttpClientBuilder; | ||
import com.azure.core.util.Configuration; | ||
|
||
import java.time.Duration; | ||
|
||
/** | ||
* Common properties used in testing. | ||
*/ | ||
final class TestUtils { | ||
static final String HUB_NAME = "Hub"; | ||
|
||
static String getEndpoint() { | ||
return Configuration.getGlobalConfiguration() | ||
.get("WEB_PUB_SUB_ENDPOINT", "http://testendpoint.webpubsubdev.azure.com"); | ||
} | ||
|
||
static String getConnectionString() { | ||
return Configuration.getGlobalConfiguration() | ||
.get("WEB_PUB_SUB_CONNECTION_STRING", "Endpoint=https://testendpoint.webpubsubdev.azure.com;AccessKey=LoremIpsumDolorSitAmetConsectetur;Version=1.0;"); | ||
} | ||
|
||
static RetryOptions getRetryOptions() { | ||
return new RetryOptions(new FixedDelayOptions(0, Duration.ofSeconds(20))); | ||
} | ||
|
||
static HttpClient buildAsyncAssertingClient(HttpClient httpClient) { | ||
return new AssertingHttpClientBuilder(httpClient) | ||
.assertAsync() | ||
.skipRequest((httpRequest, context) -> false) | ||
.build(); | ||
} | ||
|
||
private TestUtils() { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did we ad @DonotRecord here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, The recording is always empty because no network calls are made when using a connection string. Seemed wasteful to have 7 recordings that are empty being uploaded. ;/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this class isn't recording anything we should make this a normal unit tests and remove the
extends TestProxyTestBase
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other tests in this class do make network calls. :/