async def run(self):
await self.client0.connect()
- await self.client0.insert(DATA)
+ # await self.client0.insert(DATA)
- await self.client0.query('''
- alter series /series.*/ tag `SERIES`
- ''')
+ # await self.client0.query('''
+ # alter series /series.*/ tag `SERIES`
+ # ''')
- await asyncio.sleep(3.0)
+ # await asyncio.sleep(3.0)
- await self.client0.query('''
- alter series /.*/ - `SERIES` tag `OTHER`
- ''')
+ # await self.client0.query('''
+ # alter series /.*/ - `SERIES` tag `OTHER`
+ # ''')
- await self.db.add_pool(self.server1)
- await self.assertIsRunning(self.db, self.client0, timeout=30)
+ # await self.db.add_replica(self.server1, 0)
+ # await self.assertIsRunning(self.db, self.client0, timeout=30)
- await asyncio.sleep(35)
+ # await asyncio.sleep(35)
- await self.db.add_replica(self.server2, 0)
- await self.assertIsRunning(self.db, self.client0, timeout=30)
+ # await self.db.add_replica(self.server2, 0)
+ # await self.assertIsRunning(self.db, self.client0, timeout=30)
# await asyncio.sleep(45)
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
int main(int argc, char * argv[])
{
+ int seed, fd;
+
/* set local to LC_ALL and C to force a period over comma for float */
(void) setlocale(LC_ALL, "C");
/* initialize random */
- srand(time(NULL));
+ seed = 0;
+ fd = open("/dev/urandom", O_RDONLY);
+
+ if ( fd == -1 ) {
+ log_info("Could not open /dev/urandom");
+ return 1;
+ }
+
+ read(fd, &seed, sizeof(int));
+ close(fd);
+
+ srand(seed);
/* set threadpool size to 8 (default=4) */
putenv("UV_THREADPOOL_SIZE=8");