Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishek-kumar committed Sep 7, 2023
1 parent 6cfae43 commit feb1aa3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
import static org.mockito.Mockito.when;

public class RangerJSONAuditWriterTest {

public Properties props;
public Map<String, String> auditConfigs;


public void setup(){
props = new Properties();
props.setProperty("test.dir", "/tmp");
Expand Down Expand Up @@ -86,15 +86,15 @@ public void checkFileRolloverAfterThreshold() throws Exception {


assertTrue(jsonAuditWriter.logJSON(Collections.singleton("First file created and added this line!")));
jsonAuditWriter.fileSystem.deleteOnExit(jsonAuditWriter.auditPath);
jsonAuditWriter.fileSystem.deleteOnExit(jsonAuditWriter.auditPath); // cleanup
Thread.sleep(6000);

assertFalse(jsonAuditWriter.reUseLastLogFile);
assertNull(jsonAuditWriter.ostream);
assertNull(jsonAuditWriter.logWriter);

assertTrue(jsonAuditWriter.logJSON(Collections.singleton("Second file created since rollover happened!")));
jsonAuditWriter.fileSystem.deleteOnExit(jsonAuditWriter.auditPath);
jsonAuditWriter.fileSystem.deleteOnExit(jsonAuditWriter.auditPath); // cleanup
jsonAuditWriter.closeWriter();
}
}

0 comments on commit feb1aa3

Please sign in to comment.