Azure / azure-cosmosdb-java

Java Async SDK for SQL API of Azure Cosmos DB
MIT License
54 stars 61 forks source link

Resolved: TCP is now the default direct mode protocol #166. #167

Closed David-Noble-at-work closed 5 years ago

David-Noble-at-work commented 5 years ago

TODO:

Also found and fixed: A dependency issue introduced by our use of mockito and hamcrest as illustrated here:

com.microsoft.azure:azure-cosmosdb-examples:jar:2.4.5
+- org.mockito:mockito-core:jar:1.10.19:test
|  \- org.hamcrest:hamcrest-core:jar:1.1:test
\- org.hamcrest:hamcrest-all:jar:1.3:test

See the pom.xml changes and run this command to verify the fix.

mvn dependency:tree -Dverbose -Dincludes=org.hamcrest

This issue has also been addressed for v3 on this branch: danoble/rntbd/v3 and danoble/rntbd/repeat-v3

moderakh commented 5 years ago

@David-Noble-at-work the change enables TCP as the default protocol. However there are a lot of test mock which fail due to this change please look at DirectHttpsClientUnderTest and other places where when instantiating the client it was assumed that it is a direct https and test validates the direct https nature of workflow (http requests etc)

moderakh commented 5 years ago

seems there a dependency conflict somewhere

[ERROR] Tests run: 50, Failures: 2, Errors: 0, Skipped: 1, Time elapsed: 104.02 s <<< FAILURE! - in TestSuite
[ERROR] readDocumentThroughTokenResolver(com.microsoft.azure.cosmosdb.rx.examples.TokenResolverTest)  Time elapsed: 7.339 s  <<< FAILURE!
java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V
    at com.microsoft.azure.cosmosdb.rx.examples.TokenResolverTest.readDocumentThroughTokenResolver(TokenResolverTest.java:174)

[ERROR] qrderBy_Async(com.microsoft.azure.cosmosdb.rx.examples.DocumentQueryAsyncAPITest)  Time elapsed: 4.957 s  <<< FAILURE!
java.lang.NoSuchMethodError: org.hamcrest.Matcher.describeMismatch(Ljava/lang/Object;Lorg/hamcrest/Description;)V
    at com.microsoft.azure.cosmosdb.rx.examples.DocumentQueryAsyncAPITest.qrderBy_Async(DocumentQueryAsyncAPITest.java:432)

from this build: https://dev.azure.com/azure-cosmos-java/azure-cosmos-java/_build/results?buildId=1429

christopheranderson commented 5 years ago

/azp run

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