You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use Test2::V0;
use Redis;
use Test::RedisServer;
subtest 'Redis' => sub {
ok( lives { Redis->new( Test::RedisServer->new->connect_info ) },
'should instantiate a new instance',
) || diag $@;
};
done_testing();
$ yath test
( STDERR ) job 1 Path length (107) is longer than maximum supported length (104) and will be truncated at ${USER}.plenv/versions/5.30.0/lib/perl5/5.30.0/darwin-2level/Socket.pm line 872.
[ FAIL ] job 1 +~Redis
[ FAIL ] job 1 + should instantiate a new instance
( DIAG ) job 1 | Failed test 'should instantiate a new instance'
( DIAG ) job 1 | at t/overcome-max-length.t line 7.
( DIAG ) job 1 | Could not connect to Redis server at /private/var/folders/_w/q9blb5897bz8510mt67v55180000gn/T/yath-84725-978I5b/tmp/RhpQpq/2jw9bD9epA/redis.sock: No such file or directory at t/overcome-max-length.t line 6.
job 1 ^
( DIAG ) job 1 Failed test 'Redis'
( DIAG ) job 1 at t/overcome-max-length.t line 9.
( DIAG ) job 1 Seeded srand with seed '20201207' from local date.
( FAILED ) job 1 t/overcome-max-length.t
< REASON > job 1 Test script returned error (Err: 1)
< REASON > job 1 Assertion failures were encountered (Count: 1)
< REASON > job 1 Subtest failures were encountered (Count: 1)
The following jobs failed:
+--------------------------------------+-------------------------+
| Job ID | Test File |
+--------------------------------------+-------------------------+
| 721316B0-3875-11EB-A450-CCA1D99EEF75 | t/overcome-max-length.t |
+--------------------------------------+-------------------------+
Yath Result Summary
-----------------------------------------------------------------------------------
Fail Count: 1
File Count: 1
Assertion Count: 2
Wall Time: 0.81 seconds
CPU Time: 1.03 seconds (usr: 0.31s | sys: 0.05s | cusr: 0.53s | csys: 0.14s)
CPU Usage: 127%
--> Result: FAILED <--
The problem appears to be that the socket returned by Test::RedisServer->new->connect_info has a path that is too long on a MacOS (10.14.6).
I don't understand why there is a difference between prove and yath test in this instance though.
The text was updated successfully, but these errors were encountered:
Right, so it seems the issue might be that Test2-Harness sets its own TMPDIR. I noticed it might be doing that when I saw #185. Overriding it to something shorter appears to do the trick:
The following test:
Passes when run with
prove
:But fails when run with
yath test
:The problem appears to be that the socket returned by
Test::RedisServer->new->connect_info
has a path that is too long on a MacOS (10.14.6).I don't understand why there is a difference between
prove
andyath test
in this instance though.The text was updated successfully, but these errors were encountered: