Fix internal test suite
Two of the tests didn't initialize the random number generator.
This commit is contained in:
@ -20,6 +20,7 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <semaphore.h>
|
#include <semaphore.h>
|
||||||
#include <maxscale/log_manager.h>
|
#include <maxscale/log_manager.h>
|
||||||
|
#include <maxscale/random_jkiss.h>
|
||||||
|
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
using std::cout;
|
using std::cout;
|
||||||
@ -152,7 +153,7 @@ int main(int argc, char* argv[])
|
|||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
std::ios::sync_with_stdio();
|
std::ios::sync_with_stdio();
|
||||||
|
random_jkiss_init();
|
||||||
rc = sem_init(&u_semstart, 0, 0);
|
rc = sem_init(&u_semstart, 0, 0);
|
||||||
ensure(rc == 0);
|
ensure(rc == 0);
|
||||||
|
|
||||||
|
@ -66,6 +66,7 @@ test1()
|
|||||||
int input_counter = 0;
|
int input_counter = 0;
|
||||||
int output_counter = 0;
|
int output_counter = 0;
|
||||||
|
|
||||||
|
random_jkiss_init();
|
||||||
hkheartbeat = 0;
|
hkheartbeat = 0;
|
||||||
|
|
||||||
queue = mxs_queue_alloc(TEST_QUEUE_SIZE, HEARTBEATS_TO_EXPIRE);
|
queue = mxs_queue_alloc(TEST_QUEUE_SIZE, HEARTBEATS_TO_EXPIRE);
|
||||||
|
Reference in New Issue
Block a user