ravendb / ravendb-ruby-client

MIT License
4 stars 5 forks source link

RDBC-148: Align RequestExecutor to Java implementation #37

Closed dabroz closed 6 years ago

dabroz commented 6 years ago

I will investigate why HTTPS tests are not passing on Travis.

dabroz commented 6 years ago

It seems that a newer version of RavenDB server is causing problems:

        System.IO.InvalidDataException: The database 'NorthWindTest__2f543a9c-f094-4575-9bd6-936b77aed8f3' was create but is not accessible, because all of the nodes on which this database was supose to be created, had thrown an exception. ---> System.AggregateException: One or more errors occurred. (System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates
           at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
           at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
           --- End of inner exception stack trace ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
           at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at Raven.Client.Http.RequestExecutor.<ExecuteAsync>d__74`1.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Http\RequestExecutor.cs:line 693
        Response.StatusCode - InternalServerError) ---> Raven.Client.Exceptions.RavenException: System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: Peer certificate cannot be authenticated with given CA certificates
           at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
           at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(StrongToWeakReference`1 easyWrapper, CURLcode messageResult)
           --- End of inner exception stack trace ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
           at System.Net.Http.HttpClient.<FinishSendAsyncUnbuffered>d__59.MoveNext()
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at Raven.Client.Http.RequestExecutor.<ExecuteAsync>d__74`1.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Http\RequestExecutor.cs:line 693
        Response.StatusCode - InternalServerError
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at Raven.Client.Http.RequestExecutor.ThrowFailedToContactAllNodes[TResult](RavenCommand`1 command, HttpRequestMessage request) in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Http\RequestExecutor.cs:line 805
           at Raven.Client.Http.RequestExecutor.<ExecuteAsync>d__74`1.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Client\Http\RequestExecutor.cs:line 711
           --- End of inner exception stack trace ---
           --- End of inner exception stack trace ---
           at Raven.Server.Web.System.AdminDatabasesHandler.<WaitForExecutionOnRelevantNodes>d__8.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Web\System\AdminDatabasesHandler.cs:line 430
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at Raven.Server.Web.System.AdminDatabasesHandler.<CreateDatabase>d__6.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Web\System\AdminDatabasesHandler.cs:line 370
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at Raven.Server.Web.System.AdminDatabasesHandler.<Put>d__4.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Web\System\AdminDatabasesHandler.cs:line 242
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at Raven.Server.Routing.RequestRouter.<HandlePath>d__7.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\Routing\RequestRouter.cs:line 112
        --- End of stack trace from previous location where exception was thrown ---
           at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
           at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
           at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
           at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()
           at Raven.Server.RavenServerStartup.<RequestHandler>d__11.MoveNext() in C:\Builds\RavenDB-Stable-4.0\src\Raven.Server\RavenServerStartup.cs:line 160
gregolsky commented 6 years ago

@dabroz Can you tell us what JVM client commit were you syncing to?

dabroz commented 6 years ago

I was using 48d6516.

gregolsky commented 6 years ago

Additionally I strongly suggest implementing TestDriver and utilizing it in the test base. https://github.com/ravendb/ravendb-jvm-client/blob/v4.0/src/main/java/net/ravendb/client/test/driver/RavenTestDriver.java

dabroz commented 6 years ago

What is this TestDriver used for?

dabroz commented 6 years ago

OK, so:

Therefore I think this can be merged now.

gregolsky commented 6 years ago

@dabroz TestDriver is a small module that's used for writing tests utilizing RavenDB. The overall flow is as follows:

https://github.com/ravendb/ravendb-jvm-client/tree/v4.0/src/main/java/net/ravendb/client/test/driver