Skip to content

Commit c6d46a8

Browse files
committed
Fixed tests and new tarantool parts
1 parent 00a26e0 commit c6d46a8

13 files changed

Lines changed: 147 additions & 124 deletions

File tree

MANIFEST

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
.tnt/00000000000000000000.snap
2+
.tnt/00000000000000000000.vylog
3+
.tnt/00000000000000000000.xlog
4+
=1.7.5
5+
=1.7.5-184-g5be3a82
16
lib/EV/Tarantool16.pm
27
lib/EV/Tarantool16/Multi.pm
38
libs/crypto/base64.c

META.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,5 @@
4848
}
4949
},
5050
"release_status" : "stable",
51-
"version" : "1.36"
51+
"version" : "1.37"
5252
}

META.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ no_index:
3030
requires:
3131
EV: '4'
3232
Types::Serialiser: '0'
33-
version: '1.36'
33+
version: '1.37'

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ NAME
22
EV::Tarantool16 - EV client for Tarantool 1.6
33

44
VESRION
5-
Version 1.36
5+
Version 1.37
66

77
SYNOPSIS
88
use EV::Tarantool16;

README.pod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ EV::Tarantool16 - EV client for Tarantool 1.6
1717

1818
=head1 VESRION
1919

20-
Version 1.36
20+
Version 1.37
2121

2222

2323
=cut

lib/EV/Tarantool16.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use strict;
55
use warnings;
66
use Types::Serialiser;
77

8-
our $VERSION = '1.36';
8+
our $VERSION = '1.37';
99

1010
use EV ();
1111

@@ -46,7 +46,7 @@ EV::Tarantool16 - EV client for Tarantool 1.6
4646
4747
=head1 VESRION
4848
49-
Version 1.36
49+
Version 1.37
5050
5151
=cut
5252

t/01-basic.t

Lines changed: 45 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ my $tnt = {
6161
};
6262

6363
$tnt = Test::Tarantool16->new(
64-
title => $tnt->{name},
65-
host => $tnt->{host},
66-
port => $tnt->{port},
67-
logger => sub { diag ( $tnt->{title},' ', @_ ) if $ENV{TEST_VERBOSE}; },
68-
initlua => $tnt->{initlua},
64+
title => $tnt->{name},
65+
host => $tnt->{host},
66+
port => $tnt->{port},
67+
logger => sub { diag ( $tnt->{title},' ', @_ ) if $ENV{TEST_VERBOSE}; },
68+
initlua => $tnt->{initlua},
6969
wal_mode => 'write',
70-
on_die => sub { my $self = shift; fail "tarantool $self->{title} is dead!: $!"; exit 1; },
70+
on_die => sub { my $self = shift; fail "tarantool $self->{title} is dead!: $!"; exit 1; },
7171
);
7272

7373
$tnt->start(timeout => 10, sub {
@@ -241,10 +241,10 @@ subtest 'Select tests', sub {
241241
[[], {hash => 0}, {
242242
count => 4,
243243
tuples => [
244-
['t1','t2',2,[ 1, 2, 3, 'str1', 4 ]],
245-
['t1','t2',3,{35 => Types::Serialiser::false,33 => Types::Serialiser::true,key2 => 42,key1 => 'value1'}],
244+
['t1','t2',2,200,[ 1, 2, 3, 'str1', 4 ]],
245+
['t1','t2',3,0,{35 => Types::Serialiser::false,33 => Types::Serialiser::true,key2 => 42,key1 => 'value1'}],
246246
['t1','t2',17,-745,'heyo'],
247-
['tt1','tt2',456, 5]
247+
['tt1','tt2',456,5,'s']
248248
],
249249
status => 'ok',
250250
code => 0,
@@ -256,23 +256,25 @@ subtest 'Select tests', sub {
256256
count => 3,
257257
tuples => [
258258
{
259-
_t5 => 'heyo',
260-
_t4 => -745,
261259
_t1 => 't1',
262260
_t2 => 't2',
263261
_t3 => 17,
262+
_t4 => -745,
263+
_t5 => 'heyo',
264264
},
265265
{
266-
_t4 => {35 => Types::Serialiser::false,33 => Types::Serialiser::true,key2 => 42,key1 => 'value1'},
267266
_t1 => 't1',
268267
_t2 => 't2',
269268
_t3 => 3,
269+
_t4 => 0,
270+
_t5 => {35 => Types::Serialiser::false,33 => Types::Serialiser::true,key2 => 42,key1 => 'value1'},
270271
},
271272
{
272-
_t4 => [1,2,3,'str1',4],
273273
_t1 => 't1',
274274
_t2 => 't2',
275275
_t3 => 2,
276+
_t4 => 200,
277+
_t5 => [1,2,3,'str1',4],
276278
},
277279

278280
],
@@ -320,10 +322,10 @@ subtest 'Insert tests', sub {
320322
sync => ignore(),
321323
schema_id => ignore(),
322324
}],
323-
[{_t1 => "t1", _t2 => "t2", _t3 => 18, _t4 => '-100' }, { replace => 0, hash => 0 }, {
325+
[{_t1 => "t1", _t2 => "t2", _t3 => 18, _t4 => '-100', _t5 => "hello" }, { replace => 0, hash => 0 }, {
324326
count => 1,
325327
tuples => [
326-
['t1', 't2', 18, -100, undef]
328+
['t1', 't2', 18, -100, 'hello']
327329
],
328330
status => 'ok',
329331
code => 0,
@@ -332,38 +334,7 @@ subtest 'Insert tests', sub {
332334
}],
333335

334336
# Not all fields supplied tests
335-
[{_t1 => "t1", _t2 => "t2", _t3 => 18, _t5 => '-100' }, { replace => 0, hash => 1 }, {
336-
count => 1,
337-
tuples => [
338-
{
339-
_t1 => 't1',
340-
_t2 => 't2',
341-
_t3 => 18,
342-
_t4 => undef,
343-
_t5 => '-100',
344-
}
345-
],
346-
status => 'ok',
347-
code => 0,
348-
sync => ignore(),
349-
schema_id => ignore(),
350-
}],
351-
[{_t1 => "t1", _t2 => "t2", _t3 => 18, }, { replace => 0, hash => 1 }, {
352-
count => 1,
353-
tuples => [
354-
{
355-
_t1 => 't1',
356-
_t2 => 't2',
357-
_t3 => 18,
358-
_t4 => undef,
359-
_t5 => undef
360-
}
361-
],
362-
status => 'ok',
363-
code => 0,
364-
sync => ignore(),
365-
schema_id => ignore(),
366-
}],
337+
# You can't do this in 1.7.5 anymore
367338
];
368339
for my $p (@$_plan) {
369340
$c->insert($SPACE_NAME, $p->[0], $p->[1], sub {
@@ -444,7 +415,8 @@ subtest 'Delete tests', sub {
444415
_t1 => 'tt1',
445416
_t2 => 'tt2',
446417
_t3 => 456,
447-
_t4 => 5
418+
_t4 => 5,
419+
_t5 => 's'
448420
}
449421
],
450422
status => 'ok',
@@ -502,36 +474,36 @@ subtest 'Update tests', sub {
502474
}],
503475
[{_t1 => 'tt1',_t2 => 'tt2',_t3 => 456}, [ [3 => '&', 4] ], { hash => 0 }, {
504476
count => 1,
505-
tuples => [['tt1', 'tt2', 456, 4]],
477+
tuples => [['tt1', 'tt2', 456, 4, 's']],
506478
status => 'ok',
507479
code => 0,
508480
sync => ignore(),
509481
schema_id => ignore(),
510482
}],
511483
[{_t1 => 'tt1',_t2 => 'tt2',_t3 => 456}, [ [3 => '^', 4] ], { hash => 0 }, {
512484
count => 1,
513-
tuples => [['tt1', 'tt2', 456, 1]],
485+
tuples => [['tt1', 'tt2', 456, 1, 's']],
514486
status => 'ok',
515487
code => 0,
516488
sync => ignore(),
517489
schema_id => ignore(),
518490
}],
519491
[{_t1 => 'tt1',_t2 => 'tt2',_t3 => 456}, [ [3 => '|', 3] ], { hash => 0 }, {
520492
count => 1,
521-
tuples => [['tt1', 'tt2', 456, 7]],
522-
status => 'ok',
523-
code => 0,
524-
sync => ignore(),
525-
schema_id => ignore(),
526-
}],
527-
[{_t1 => 'tt1',_t2 => 'tt2',_t3 => 456}, [ [3 => '#', 2] ], { hash => 0 }, {
528-
count => 1,
529-
tuples => [['tt1', 'tt2', 456]],
493+
tuples => [['tt1', 'tt2', 456, 7, 's']],
530494
status => 'ok',
531495
code => 0,
532496
sync => ignore(),
533497
schema_id => ignore(),
534498
}],
499+
# [{_t1 => 'tt1',_t2 => 'tt2',_t3 => 456}, [ [6 => '#', 1] ], { hash => 0 }, {
500+
# count => 1,
501+
# tuples => [['tt1', 'tt2', 456, 7, 's']],
502+
# status => 'ok',
503+
# code => 0,
504+
# sync => ignore(),
505+
# schema_id => ignore(),
506+
# }],
535507
[{_t1 => 't1',_t2 => 't2',_t3 => 17}, [ [3 => '=', 12] ], { hash => 1 }, {
536508
count => 1,
537509
tuples => [
@@ -552,11 +524,11 @@ subtest 'Update tests', sub {
552524
count => 1,
553525
tuples => [
554526
{
555-
_t5 => {a => 1, b => 2, c => 3},
556527
_t1 => 't1',
557528
_t2 => 't2',
558529
_t3 => 17,
559530
_t4 => -745,
531+
_t5 => {a => 1, b => 2, c => 3},
560532
'' => ['heyo']
561533
}
562534
],
@@ -612,59 +584,59 @@ subtest 'Upsert tests', sub {
612584
diag '==== Upsert tests ====' if $ENV{TEST_VERBOSE};
613585

614586
my $_plan = [
615-
[{_t1 => 't1',_t2 => 't2',_t3 => 1}, [ [3 => '=', 10] ], { hash => 0 }, {
587+
[{_t1 => 't1',_t2 => 't2',_t3 => 1, _t4 => 5, _t5 => 's'}, [ [3 => '=', 10] ], { hash => 0 }, {
616588
count => 1,
617-
tuples => [['t1', 't2', 1, undef, undef]],
589+
tuples => [['t1', 't2', 1, 5, 's']],
618590
status => 'ok',
619591
code => 0,
620592
sync => ignore(),
621593
schema_id => ignore(),
622594
}],
623-
[{_t1 => 't1',_t2 => 't2',_t3 => 1}, [ [3 => '=', 10] ], { hash => 0 }, {
595+
[{_t1 => 't1',_t2 => 't2',_t3 => 1, _t4 => 5, _t5 => 's'}, [ [3 => '=', 10] ], { hash => 0 }, {
624596
count => 1,
625-
tuples => [['t1', 't2', 1, 10, undef]],
597+
tuples => [['t1', 't2', 1, 10, 's']],
626598
status => 'ok',
627599
code => 0,
628600
sync => ignore(),
629601
schema_id => ignore(),
630602
}],
631-
[{_t1 => 't1',_t2 => 't2',_t3 => 1}, [ [3 => '+', 4] ], { hash => 0 }, {
603+
[{_t1 => 't1',_t2 => 't2',_t3 => 1, _t4 => 5, _t5 => 's'}, [ [3 => '+', 4] ], { hash => 0 }, {
632604
count => 1,
633-
tuples => [['t1', 't2', 1, 14, undef]],
605+
tuples => [['t1', 't2', 1, 14, 's']],
634606
status => 'ok',
635607
code => 0,
636608
sync => ignore(),
637609
schema_id => ignore(),
638610
}],
639-
[{_t1 => 't1',_t2 => 't2',_t3 => 1}, [ [3 => '-', 3] ], { hash => 0 }, {
611+
[{_t1 => 't1',_t2 => 't2',_t3 => 1, _t4 => 5, _t5 => 's'}, [ [3 => '-', 3] ], { hash => 0 }, {
640612
count => 1,
641-
tuples => [['t1', 't2', 1, 11, undef]],
613+
tuples => [['t1', 't2', 1, 11, 's']],
642614
status => 'ok',
643615
code => 0,
644616
sync => ignore(),
645617
schema_id => ignore(),
646618
}],
647-
[{_t1 => 't1',_t2 => 't2',_t3 => 1}, [ [3 => '=', 8] ], { hash => 0 }, {
619+
[{_t1 => 't1',_t2 => 't2',_t3 => 1, _t4 => 5, _t5 => 's'}, [ [3 => '=', 8] ], { hash => 0 }, {
648620
count => 1,
649-
tuples => [['t1', 't2', 1, 8, undef]],
621+
tuples => [['t1', 't2', 1, 8, 's']],
650622
status => 'ok',
651623
code => 0,
652624
sync => ignore(),
653625
schema_id => ignore(),
654626
}],
655-
[{_t1 => 't1',_t2 => 't2',_t3 => 1}, [ [4 => '=', 17] ], { hash => 0 }, {
627+
[{_t1 => 't1',_t2 => 't2',_t3 => 1, _t4 => 5, _t5 => 's'}, [ [4 => '=', 17] ], { hash => 0 }, {
656628
count => 1,
657629
tuples => [['t1', 't2', 1, 8, 17]],
658630
status => 'ok',
659631
code => 0,
660632
sync => ignore(),
661633
schema_id => ignore(),
662634
}],
663-
[{_t1 => 't1',_t2 => 't2',_t3 => 2}, [ [3 => '=', 17] ], { hash => 0 }, {
635+
[{_t1 => 't1',_t2 => 't2',_t3 => 2, _t4 => 5, _t5 => 's'}, [ [3 => '=', 17] ], { hash => 0 }, {
664636
count => 2,
665637
tuples => [
666638
['t1', 't2', 1, 8, 17],
667-
['t1', 't2', 2, undef, undef],
639+
['t1', 't2', 2, 5, 's'],
668640
],
669641
status => 'ok',
670642
code => 0,

t/04-writeio.t

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ my $tnt = {
3838
};
3939

4040
$tnt = Test::Tarantool16->new(
41-
title => $tnt->{name},
42-
host => $tnt->{host},
43-
port => $tnt->{port},
44-
logger => sub { diag ( $tnt->{title},' ', @_ ) if $ENV{TEST_VERBOSE}; },
45-
initlua => $tnt->{initlua},
46-
on_die => sub { fail "tarantool $tnt->{name} is dead!: $!"; exit 1; },
41+
title => $tnt->{name},
42+
host => $tnt->{host},
43+
port => $tnt->{port},
44+
logger => sub { diag ( $tnt->{title},' ', @_ ) if $ENV{TEST_VERBOSE}; },
45+
initlua => $tnt->{initlua},
46+
wal_mode => 'write',
47+
on_die => sub { fail "tarantool $tnt->{name} is dead!: $!"; exit 1; },
4748
);
4849

4950
$tnt->start(timeout => 10, sub {

0 commit comments

Comments
 (0)