[patches] [PATCH 1/1] test: check that netbox does not repeat request on schema change

Konstantin Osipov kostja at tarantool.org
Thu Mar 1 20:01:23 MSK 2018


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [18/02/26 19:27]:
> --- a/test/box/net.box.test.lua
> +++ b/test/box/net.box.test.lua
> @@ -871,4 +871,26 @@ while disconnected == false do fiber.sleep(0.01) end
>  disconnected -- true
>  
>  box.session.on_disconnect(nil, on_disconnect)
> +
> +--
> +-- gh-2666: check that netbox.call is not repeated on schema
> +-- change.
> +--
> +box.schema.user.grant('guest', 'write', 'space', '_space')
> +box.schema.user.grant('guest', 'write', 'space', '_schema')
> +count = 0
> +function create_space(name) count = count + 1 box.schema.create_space(name) return true end
> +c = net.connect(box.cfg.listen)
> +c:call('create_space', {'test1'})
> +count
> +c:call('create_space', {'test2'})
> +count
> +c:call('create_space', {'test3'})
> +count
> +box.space.test1:drop()
> +box.space.test2:drop()
> +box.space.test3:drop()
> +box.schema.user.revoke('guest', 'write', 'space', '_space')
> +box.schema.user.revoke('guest', 'write', 'space', '_schema')

Please don't forget next time to close the connection.
I will push this patch.

-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32
http://tarantool.org - www.twitter.com/kostja_osipov



More information about the Tarantool-patches mailing list