postgresql-embedded icon indicating copy to clipboard operation
postgresql-embedded copied to clipboard

Does not work on Travis CI with 2.5(PostgreSQL 10)

Open kazuki43zoo opened this issue 7 years ago • 5 comments

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.

kazuki43zoo avatar Nov 22 '17 20:11 kazuki43zoo

Note: Work fine on Mac OS.

kazuki43zoo avatar Nov 22 '17 20:11 kazuki43zoo

@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 avatar Nov 23 '17 00:11 smecsia

@smecsia , Thanks for your comments. A workaround is working fine!

kazuki43zoo avatar Nov 23 '17 01:11 kazuki43zoo

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?

addmeaning avatar Jan 16 '18 08:01 addmeaning

Same error than @smecsia on Ubuntu 17.10.

sdeleuze avatar Apr 13 '18 13:04 sdeleuze