-
Notifications
You must be signed in to change notification settings - Fork 0
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
[pull] master from tarantool:master #67
Commits on Jan 25, 2024
-
api: change
Response
type to interfaceThis commit creates a new `Response` interface. But still, only one `Response` implementation exists: `ConnResponse`. Custom responses (including mocks) are expected to implement this interface. Create a `Response` interface and its implementation `ConnResponse`. For the `Future` method `Get` now returns response data. To get the actual response new method `GetResponse` is added. `IsPush()` method is added to the response iterator. It returns the information if the current response is a `Push`. Right now it does not have a lot of usage, but it will be crucial once we create a separate response for pushes. Part of #237
Configuration menu - View commit details
-
Copy full SHA for 4784b55 - Browse repository at this point
Copy the full SHA 4784b55View commit details -
api: create different responses for different requests
Different implementations of the `Response` interface created. Special types of responses are used with special requests. Thus `Response` interface was simplified: some special methods were moved to the corresponding implementations. This means that if a user wants to access this methods, the response should be casted to its actual type. `SelectResponse`, `ExecuteResponse`, `PrepareResponse`, `PushResponse` are part of a public API. `Pos()`, `MetaData()`, `SQLInfo()` methods created for them to get specific info. `Future` constructors now accept `Request` as their argument. `Future` methods `AppendPush` and `SetResponse` accept response `Header` and data as their arguments. `IsPush()` method is used to return the information if the current response is a `PushResponse`. `PushCode` constant is removed. To get information, if the current response is a push response, `IsPush()` method could be used instead. After this patch, operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Connector` return response data instead of an actual responses. After this patch, operations `Ping`, `Select`, `Insert`, `Replace`, `Delete`, `Update`, `Upsert`, `Call`, `Call16`, `Call17`, `Eval`, `Execute` of a `Pooler` return response data instead of an actual responses. Part of #237
Configuration menu - View commit details
-
Copy full SHA for c59e514 - Browse repository at this point
Copy the full SHA c59e514View commit details -
api: add ability to mock connections in tests
Create a mock implementations `MockRequest`, `MockResponse` and `MockDoer`. The last one allows to mock not the full `Connection`, but its part -- a structure, that implements new `Doer` interface (a `Do` function). Also added missing comments, all the changes are recorded in the `CHANGELOG` and `README` files. Added new tests and examples. So this entity is easier to implement and it is enough to mock tests that require working `Connection`. All new mock structs and an example for `MockDoer` usage are added to the `test_helpers` package. Added new structs `MockDoer`, `MockRequest` to `test_helpers`. Renamed `StrangerResponse` to `MockResponse`. Added new connection log constant: `LogAppendPushFailed`. It is logged when connection fails to append a push response. Closes #237
Configuration menu - View commit details
-
Copy full SHA for 514b0d0 - Browse repository at this point
Copy the full SHA 514b0d0View commit details -
ci: bump 1.10 master for macOS
1.10.14 build is flacky on macOS-12 runner. Bump to 1.10.15 hopefully helps with this issue.
Configuration menu - View commit details
-
Copy full SHA for a2ad272 - Browse repository at this point
Copy the full SHA a2ad272View commit details
Commits on Jan 26, 2024
-
bugfix: fix read/write goroutine alive after tests
TestConn_ReadWrite causes endless read/write in goroutines after execution of the test. The patch fixes the problem.
Configuration menu - View commit details
-
Copy full SHA for b6e0c4a - Browse repository at this point
Copy the full SHA b6e0c4aView commit details -
The type Instance: ``` type Instance struct { // Name is an unique name of the instance. Name string // Dialer will be used to create a connection to the instance. Dialer tarantool.Dialer // Opts will be used to specify a connection options. Opts tarantool.Opts } ``` The type allows to specify a dialer and connection options per a pool instance. It is used in `pool.Connect`, `pool.ConnectWithOpts` and `pool.Add` to specify an instance configuration now. Closes #356
Configuration menu - View commit details
-
Copy full SHA for b8d9914 - Browse repository at this point
Copy the full SHA b8d9914View commit details