def setUp(self):
super(TestElastic, self).setUp()<EOL>try:<EOL><INDENT>os.unlink("<STR_LIT>")<EOL><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>docman = DocManager(elastic_pair,<EOL>auto_commit_interval=<NUM_LIT:0>)<EOL>self.connector = Connector(<EOL>mongo_address=self.repl_set.uri,<EOL>ns_set=['<STR_LIT>'],<EOL>doc_managers=(docman,),<EOL>gridfs_set=['<STR_LIT>']<EOL>)<EOL>self.conn.test.test.drop()<EOL>self.conn.test.test.files.drop()<EOL>self.conn.test.test.chunks.drop()<EOL>self.connector.start()<EOL>assert_soon(lambda: len(self.connector.shard_set) > <NUM_LIT:0>)<EOL>assert_soon(lambda: self._count() == <NUM_LIT:0>)<EOL>
Start a new Connector for each test.