#990196 spymemcached: testLibKetamaWeightedCompatLibmemcached test fails on reverse lookup on 127.0.0.1

Package:
src:spymemcached
Source:
spymemcached
Submitter:
Ariel D'Alessandro
Date:
2021-06-22 14:33:03 UTC
Severity:
normal
Tags:
#990196#5
Date:
2021-06-22 14:23:54 UTC
From:
To:
Dear Maintainer,

Dear Maintainer,

Test testLibKetamaWeightedCompatLibmemcached expects a reverse lookup on
127.0.0.1 to be localhost. In the case the first entry of /etc/hosts
matches a different hostname than localhost, the package will FTBFS.

Overall, this package will always fail to build if the host building it
has a different entry in /etc/hosts. Is this really required to test
the package? Seems to be adding an unreasonable constraint to the
building host.

Regards,
Ariel D'Alessandro

#990196#10
Date:
2021-06-22 14:31:41 UTC
From:
To:
With the following system configuration:

    $ cat /etc/hosts
    127.0.0.1	foo_not_localhost
    127.0.0.1	localhost

Package spymemcached FTBFS, failing in the following test"

[INFO] Running net.spy.memcached.KetamaNodeLocatorTest
[ERROR] Tests run: 17, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
0.09 s <<< FAILURE! - in net.spy.memcached.KetamaNodeLocatorTest
[ERROR]
testLibKetamaWeightedCompatLibmemcached(net.spy.memcached.KetamaNodeLocatorTest)
 Time elapsed: 0.011 s  <<< FAILURE!
junit.framework.ComparisonFailure:
expected:<[localhost/127.0.0.1:11212]> but
was:<[foo_not_localhost/127.0.0.1:11211]>
	at
net.spy.memcached.KetamaNodeLocatorTest.testLibKetamaWeightedCompatLibmemcached(KetamaNodeLocatorTest.java:208)

Regards,
Ariel