@@ -86,41 +86,41 @@ public void testScan() throws IOException {
86
86
public void testClean () throws IOException {
87
87
final String repoDir = getCurrentTestDir ().getCanonicalPath () + File .separator + "repo2" ;
88
88
89
- StroomZipRepository StroomZipRepository = new StroomZipRepository (repoDir , false , 10000 , ZIP_FILENAME_DELIMITER );
89
+ StroomZipRepository stroomZipRepository = new StroomZipRepository (repoDir , false , 10000 , ZIP_FILENAME_DELIMITER );
90
90
91
- final StroomZipOutputStream out1 = StroomZipRepository .getStroomZipOutputStream ();
91
+ final StroomZipOutputStream out1 = stroomZipRepository .getStroomZipOutputStream ();
92
92
StroomZipOutputStreamUtil .addSimpleEntry (out1 , new StroomZipEntry (null , "file" , StroomZipFileType .Data ),
93
93
"SOME_DATA" .getBytes (StreamUtil .DEFAULT_CHARSET ));
94
94
Assert .assertFalse (out1 .getFinalFile ().isFile ());
95
95
out1 .close ();
96
96
Assert .assertTrue (out1 .getFinalFile ().isFile ());
97
97
98
- final StroomZipOutputStream out2 = StroomZipRepository .getStroomZipOutputStream ();
98
+ final StroomZipOutputStream out2 = stroomZipRepository .getStroomZipOutputStream ();
99
99
StroomZipOutputStreamUtil .addSimpleEntry (out2 , new StroomZipEntry (null , "file" , StroomZipFileType .Data ),
100
100
"SOME_DATA" .getBytes (StreamUtil .DEFAULT_CHARSET ));
101
101
Assert .assertFalse (out2 .getFinalFile ().isFile ());
102
102
Assert .assertTrue (new File (out2 .getFinalFile ().getAbsolutePath () + StroomZipRepository .LOCK_EXTENSION ).isFile ());
103
103
104
104
// Leave open
105
105
106
- StroomZipRepository = new StroomZipRepository (repoDir , false , 1000 , ZIP_FILENAME_DELIMITER );
106
+ stroomZipRepository = new StroomZipRepository (repoDir , false , 10000 , ZIP_FILENAME_DELIMITER );
107
107
Assert .assertTrue ("Expecting pucker file to be left" , out1 .getFinalFile ().isFile ());
108
108
Assert .assertTrue ("Expecting lock file to not be deleted" ,
109
109
new File (out2 .getFinalFile ().getAbsolutePath () + StroomZipRepository .LOCK_EXTENSION ).isFile ());
110
110
111
- final StroomZipOutputStream out3 = StroomZipRepository .getStroomZipOutputStream ();
111
+ final StroomZipOutputStream out3 = stroomZipRepository .getStroomZipOutputStream ();
112
112
StroomZipOutputStreamUtil .addSimpleEntry (out3 , new StroomZipEntry (null , "file" , StroomZipFileType .Data ),
113
113
"SOME_DATA" .getBytes (StreamUtil .DEFAULT_CHARSET ));
114
114
final File lockFile3 = new File (out3 .getFinalFile ().getAbsolutePath () + StroomZipRepository .LOCK_EXTENSION );
115
115
Assert .assertTrue (lockFile3 .isFile ());
116
116
117
- StroomZipRepository .clean ();
117
+ stroomZipRepository .clean ();
118
118
Assert .assertTrue (lockFile3 .isFile ());
119
119
120
120
if (!lockFile3 .setLastModified (System .currentTimeMillis () - (48 * 60 * 60 * 1000 ))) {
121
121
Assert .fail ("Unable to set LastModified" );
122
122
}
123
- StroomZipRepository .clean ();
123
+ stroomZipRepository .clean ();
124
124
Assert .assertFalse ("Expecting old lock file to be deleted" , lockFile3 .isFile ());
125
125
}
126
126
0 commit comments