mhassan1 / redis-memory-server

Redis Server for testing. The server will allow you to connect your favorite client library to the Redis Server and run parallel integration tests isolated from each other.
MIT License
76 stars 11 forks source link

Instance failed in e2e tests #25

Closed MohamedGouaouri closed 11 months ago

MohamedGouaouri commented 1 year ago

I'm using redis-memory-server in my e2e tests using jest The code bellow throws an error

beforeAll(async () => {
      redisInstance = new RedisMemoryServer();
  }
)

the error is

Starting the instance failed, please enable debug for more infomation

Note The docker image used is node:20-buster

mhassan1 commented 1 year ago

I would expect to see some output like this:

    Command failed: make
        LINK redis-server
    cc: error: ../deps/jemalloc/lib/libjemalloc.a: No such file or directory
    make[1]: *** [Makefile:403: redis-server] Error 1
    make: *** [Makefile:6: all] Error 2
ricardo8990 commented 11 months ago

Hi @mhassan1, I'm getting a similar error. When enabled REDISMS_DEBUG I got the following output:

  RedisMS:RedisMemoryServer Called RedisMemoryServer.ensureInstance() method +0ms
  RedisMS:RedisMemoryServer  - no running instance, call `start()` command +0ms
  RedisMS:RedisMemoryServer Called RedisMemoryServer.start() method +1ms
  RedisMS:RedisMemoryServer starting with port 37687, since undefined was locked: 37687 +1ms
  RedisMS:RedisMemoryServer Starting Redis instance with following options: {"port":37687,"ip":"127.0.0.1"} +0ms
  RedisMS:RedisBinary RedisBinary options: {
  "downloadDir": "/ares/node_modules/.cache/redis-memory-server/redis-binaries",
  "version": "stable"
} +0ms
  RedisMS:RedisBinary RedisBinary: Download lock removed +7ms
  RedisMS:RedisBinary RedisBinary: redis-server binary path: "/ares/node_modules/.cache/redis-memory-server/redis-binaries/stable/redis-server" +0ms
  RedisMS:RedisInstance Redis[37687]: Called RedisInstance._launchKiller(parent: 861, child: 993): +0ms
  RedisMS:RedisInstance Redis[37687]: STDERR: /ares/node_modules/.cache/redis-memory-server/redis-binaries/stable/redis-server: 1: Syntax error: "(" unexpected
  RedisMS:RedisInstance  +7ms
  RedisMS:RedisInstance Redis[37687]: redis-server instance closed with an non-0 code! +0ms
  RedisMS:RedisInstance Redis[37687]: CLOSE: 2 +0ms
  RedisMS:RedisInstance Redis[37687]: RedisInstance: Instance has failed: redis-server instance closed with code "2" +0ms
  RedisMS:RedisInstance Redis[37687]: [RedisKiller]: exit - [null,"SIGTERM"] +41ms

The image I'm using is node:20.3 and also tried with node:20.3-bookworm-slim.

Do you have any idea about this error? Thank you

mhassan1 commented 11 months ago

@MohamedGouaouri @ricardo8990 Please try redis-memory-server@0.10.0.