Azure / azure-cosmos-dotnet-v3

.NET SDK for Azure Cosmos DB for the core SQL API
MIT License
736 stars 491 forks source link

[Internal] Tests : Fixes `dotnet test` reported below issues #4501

Closed kirankumarkolli closed 2 months ago

kirankumarkolli commented 4 months ago

Fixes dotnet test reported below issues

[D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_Retry_SingleMaster_Read_PreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_Retry_MultiMaster_Read_PreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_Retry_MultiMaster_Write_PreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_NoRetry_SingleMaster_Write_PreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_NoRetry_SingleMaster_Read_NoPreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_NoRetry_SingleMaster_Write_NoPreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_NoRetry_MultiMaster_Read_NoPreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA007: Method ClientRetryPolicy_NoRetry_MultiMaster_Write_NoPreferredLocations defined in class Microsoft.Azure.Cosmos.Client.Tests.ClientRetryPolicyTests does not have correct signature. Test method marked with the [TestMethod] attribute must be non-static, public, return-type as void  and should not take any parameter. Example: public void Test.Class1.Test(). Additionally, if you are using async-await in test method then return-type must be Task. Example: public async Task Test.Class1.Test2()

There are still some more query test issues that needs attention (next follow-Up)

[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA001: TestClass attribute defined on non-public class Microsoft.Azure.Cosmos.Tests.Query.OrderByQueryPartitionRangePageAsyncEnumeratorTests+Implementation
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA001: TestClass attribute defined on non-public class Microsoft.Azure.Cosmos.Tests.Query.QueryPartitionRangePageAsyncEnumeratorTests+Implementation
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA001: TestClass attribute defined on non-public class Microsoft.Azure.Cosmos.Tests.Pagination.BufferedPartitionPartitionRangeEnumeratorTests+Implementation
[MSTest][Discovery][D:\a\1\s\Microsoft.Azure.Cosmos\tests\Microsoft.Azure.Cosmos.Tests\bin\Debug\net6.0\Microsoft.Azure.Cosmos.Tests.dll] UTA001: TestClass attribute defined on non-public class Microsoft.Azure.Cosmos.Tests.Pagination.SinglePartitionPartitionRangeEnumeratorTests+Implementation
neildsh commented 4 months ago

/azp run

azure-pipelines[bot] commented 4 months ago
Azure Pipelines successfully started running 1 pipeline(s).