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

Clean up dependencies for live / mock testing for client libraries #3208

Closed
JonathanGiles opened this issue Mar 26, 2019 · 6 comments
Closed
Assignees
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library.

Comments

@JonathanGiles
Copy link
Member

JonathanGiles commented Mar 26, 2019

At present, to enable our live / mock tests, we are using two specific versions of azure-mgmt-resources, as this particular management library provided utility classes for live/mock testing that are helpful. Depending on management libraries within the client libraries for testing feels weird, but even worse is the fact that we depend on two different versions, with one being a snapshot.

What I propose is that we isolate the set of classes we use out of azure-mgmt-resources, and add these as classes in either an azure-common-test module, or else as part of azure-common in src/test.

  1. We need an InterceptorManager. There are two candidates (and we may bring them both in, for track two and track one, respectively):
    1.1 The 'V3' InterceptorManager
    1.2 The 'original' InterceptorManager

  2. We also require com.microsoft.azure.management.resources.core.TestBase, or an equivalent.

  3. As well as com.microsoft.azure.management.resources.fluentcore.utils.ResourceManagerThrottlingInterceptor

  4. We should transfer relevant test classes out of the azconfig directory into this new location.

The ideal outcome out of this would be to entirely drop out dependency on azure-mgmt-resources, and to resolve the dependency version divergence that we create.

@JonathanGiles JonathanGiles added Client This issue points to a problem in the data-plane of the library. common common module used by all azure SDKs (e.g. client, Mgmt) labels Mar 26, 2019
@JonathanGiles JonathanGiles self-assigned this Mar 26, 2019
@conniey conniey self-assigned this Apr 12, 2019
@mayurid mayurid assigned sima-zhu and unassigned JonathanGiles and conniey Apr 15, 2019
@mayurid
Copy link
Member

mayurid commented Apr 15, 2019

@sima-zhu Please work with @conniey on this and help drive this.
// @JonathanGiles

@sima-zhu
Copy link
Contributor

Started from the guideline in the description.

  1. InterceptionManager initial change has checked in. Looked into the individual sdk libraries who depend on the interceptionManager. And reorganize the necessary part.
  2. TestBase initial change has checked in. Same as above.
  3. No ResourceManagerThrottlingInterceptor. Need to implement one in test assets.
  4. The step has checked in by Connie. No more work needs to be done for now.

@JonathanGiles
Copy link
Member Author

The main goal here is to no longer depend on azure-mgmt-resources in any of our client libraries.

@sima-zhu
Copy link
Contributor

I will divide the task into two major parts:

  1. Keep each client sdk test code as it is. PR
  2. For each individual client sdk, remove the dependency on azure-mgmt-resources.

@sima-zhu
Copy link
Contributor

#3472

@mayurid mayurid added Azure.Core azure-core and removed common common module used by all azure SDKs (e.g. client, Mgmt) labels Apr 30, 2019
@sima-zhu
Copy link
Contributor

sima-zhu commented May 8, 2019

Finished #1, #2, #4
For #3, currently the use case can basically be covered by reactor API(https://www.javacodegeeks.com/2017/09/testing-time-based-reactor-core-streams-virtual-time.html)

We will implement the interceptor if there is use case we need to build up more stuff on the top of the API.

Same as the ResourceManagerThrottlingInterceptor, we will add more functionalities when they are necessary in track two.

I will close the issue for now. Please feel free to reopen if any other issue to address.

@sima-zhu sima-zhu closed this as completed May 8, 2019
@github-actions github-actions bot locked and limited conversation to collaborators Apr 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Azure.Core azure-core Client This issue points to a problem in the data-plane of the library.
Projects
None yet
Development

No branches or pull requests

4 participants