postgresql-embedded
postgresql-embedded copied to clipboard
Does not work on Travis CI with 2.5(PostgreSQL 10)
I've upgraded to 2.5 (=PostgreSQL 10). But it does not work on Travis CI(Linux).
See https://travis-ci.org/kazuki43zoo/mybatis-3/jobs/299145674#L3460-L3538
Note:
2.5 with PostgreSQL 9.6.5(new EmbeddedPostgres(Version.V9_6_5)) work fine.
Note: Work fine on Mac OS.
@kazuki43zoo I've tested your case in my local environment (Ubuntu 16.04) and can confirm the failure. I haven't dug deeper, but your problem is that initdb of 10.1 fails with the following:
postgres: error while loading shared libraries: libicuuc.so.53: cannot open shared object file: No such file or directory
I've found a workaround: you're using Paths.get("target/postgres") as a cached directory. Changing this to Paths.get(System.getProperty("java.io.tmpdir"), "pgembed") fixes the problem,
Also I'd suggest you to add this line to your log4j.properties to be able to track possible failures in the future (with postgresql-embedded > 2.5):
log4j.logger.ru.yandex.qatools.embed.postgresql=WARN, stdout
@smecsia , Thanks for your comments. A workaround is working fine!
Does ebmeddedPostgres.restoreFromFile() works on Travis? As far as I understand, the library uses flapdoodle to spin "pg_restore" process. Does the library provide "pg_restore" executable for Travis environment?
Same error than @smecsia on Ubuntu 17.10.