4

Is there any in-memory mock server available for Aerospike Unit Testing? Currently I have vagrant setup on my local to run aerospike but that might not be available on our build servers. How should I unit test otherwise?

dejavu
  • 3,236
  • 7
  • 35
  • 60
  • Build servers can't connect to another server? Talk to your admins. Especially since there ARE bugs with certain features (e.g. LDTs) from time to time if certain client versions connect to certain server versions. You would loose a lot of coverage if you mock it. – Manuel Arwed Schmidt Dec 17 '15 at 20:22
  • Have you take a look at https://github.com/getintent/embedded-aerospike ? – Kirill Solokhov Apr 18 '16 at 10:15

3 Answers3

4

Have you looked into Docker? It's a pretty useful tool for creating a self contained environment and managing resource usage. It also runs well with Vagrant so you can build containers in your development environment and port them easily for testing

Ben Bates
  • 707
  • 3
  • 7
4

In-memory mock test application logic and does not check any aerospike related bugs, It's like have two completely different implementation of your Storage interface: aerospike and in-memory.

Instead of this I can offer your other approach - small framework for aerospike testing with docker https://github.com/getintent/embedded-aerospike you can perform with this framework both unit and integration testing!

Kirill Solokhov
  • 400
  • 4
  • 16
3

The internal details about Aerospike Unit are available here

http://bytepadding.com/big-data/spark/aeorpsike-unit-test-framework

I have made a aerospike-unit module, which one can use while writing unit, Integration test cases. (Java Project)

Open Source CodeBase: https://github.com/maverickgautam/Aerospike-unit

Readme available at https://github.com/maverickgautam/Aerospike-unit/blob/master/README

Hope Aerospike community finds this useful

This is a Java wrapper over actual Aerospike Server which can be used for unit + Integration Testing.

Ajay S
  • 48,003
  • 27
  • 91
  • 111
KrazyGautam
  • 2,839
  • 2
  • 21
  • 31