Skip to content
Snippets Groups Projects
Commit 5893d61d authored by Serge Petrenko's avatar Serge Petrenko Committed by Vladimir Davydov
Browse files

net.box: introduce _inject remote method

The inject remote method is used in testing quite a lot. For example,
when someone needs to pass arbitrary MsgPack to Tarantool.

The current way to use it is:
conn:_request(netbox._method.inject, opts, nil, nil, custom_msgpack)

This is quite long and ugly, so let's add a helper:
conn:_inject(custom_msgpack, opts)

Also, while we're at it, lets fix the following issue.
The _inject remote method is barely usable without knowing which sync
net.box will use for the next request.

On the one hand, the user has to encode some custom sync to the request
he's injecting.
On the other hand, net.box doesn't parse the custom sync and always uses
its own pre-generated one to wait for the request response.

So the user has to pick the correct sync value, which net.box uses
internally.

Let's make life simpler and introduce _next_sync method, which returns
the next sync, which will be used by net.box.

In-scope-of #6857
Closes #7177

NO_DOC=internal change
NO_CHANGELOG=internal change
NO_TEST=tested implicitly in next commit
parent c6485d8d
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment