diff --git a/tests/test27cells.c b/tests/test27cells.c
index 7915511eed50a229a94eda6bb338607099303421..2c7beb85c3dd5e95780a2f7d82da6bc4553117a3 100644
--- a/tests/test27cells.c
+++ b/tests/test27cells.c
@@ -31,14 +31,6 @@ enum velocity_types {
   velocity_rotating
 };
 
-/**
- * @brief Returns a random number (uniformly distributed) in [a,b[
- */
-double random_uniform(double a, double b) {
-  return (rand() / (double)RAND_MAX) * (b - a) + a;
-}
-
-
 /**
  * @brief Constructs a cell and all of its particle in a valid state prior to
  * a DOPAIR or DOSELF calcuation.
@@ -127,6 +119,8 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
   cell->ti_end_min = 1;
   cell->ti_end_max = 1;
 
+  shuffle_particles(cell->parts,cell->count);
+
   cell->sorted = 0;
   cell->sort = NULL;
   cell->sortsize = 0;
diff --git a/tests/testPair.c b/tests/testPair.c
index 6e46b577ca63a8d3c2edce888a7485af0949813d..083ccf497109760130d84f73d75d0cd1f6054e10 100644
--- a/tests/testPair.c
+++ b/tests/testPair.c
@@ -24,13 +24,6 @@
 #include <unistd.h>
 #include "swift.h"
 
-/**
- * Returns a random number (uniformly distributed) in [a,b[
- */
-double random_uniform(double a, double b) {
-  return (rand() / (double)RAND_MAX) * (b - a) + a;
-}
-
 /* n is both particles per axis and box size:
  * particles are generated on a mesh with unit spacing
  */
@@ -93,6 +86,8 @@ struct cell *make_cell(size_t n, double *offset, double size, double h,
   cell->ti_end_min = 1;
   cell->ti_end_max = 1;
 
+  shuffle_particles(cell->parts,cell->count);
+
   cell->sorted = 0;
   cell->sort = NULL;
   cell->sortsize = 0;