Skip to content

Jedis flushAll and disconnect before other things? #7

@eguitarkchen

Description

@eguitarkchen

ProducerTest.java :

@before
public void setUp() throws IOException {
Jedis jedis = new Jedis("localhost");
jedis.flushAll();
jedis.disconnect();
}

I don't know why do this , I think change @before to @after maybe more appropriate.
so , I use this:

@Before
public void setUp() throws IOException {
    jedis = new Jedis(redisHost, port, 1000);
    jedis.auth(auth);//set redis password
}

@After
public void flush() throws IOException {
    jedis.flushAll();
    jedis.disconnect();
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions