@@ -230,8 +230,7 @@ public boolean evaluate() throws Exception {
230230
231231 }
232232
233- private void appendEntries (WALProvider .Writer writer , int numEntries , boolean closeAfterAppends )
234- throws IOException {
233+ private void appendEntries (WALProvider .Writer writer , int numEntries ) throws IOException {
235234 for (int i = 0 ; i < numEntries ; i ++) {
236235 byte [] b = Bytes .toBytes (Integer .toString (i ));
237236 KeyValue kv = new KeyValue (b ,b ,b );
@@ -245,13 +244,7 @@ private void appendEntries(WALProvider.Writer writer, int numEntries, boolean cl
245244 writer .append (new WAL .Entry (key , edit ));
246245 writer .sync (false );
247246 }
248- if (closeAfterAppends ) {
249- writer .close ();
250- }
251- }
252-
253- private void appendEntries (WALProvider .Writer writer , int numEntries ) throws IOException {
254- appendEntries (writer , numEntries , true );
247+ writer .close ();
255248 }
256249
257250 private long getPosition (WALFactory wals , Path log2 , int numEntries ) throws IOException {
@@ -384,7 +377,7 @@ public void testSetLogPositionAndRemoveOldWALsEvenIfNoCfsReplicated() throws Exc
384377 WALProvider .Writer writer2 = WALFactory .createWALWriter (FS , log2 , TEST_UTIL .getConfiguration ());
385378
386379 appendEntries (writer1 , 3 );
387- appendEntries (writer2 , 2 , false );
380+ appendEntries (writer2 , 2 );
388381 final long pos = getPosition (wals , log2 , 2 );
389382
390383 final ReplicationEndpointForTest endpoint = new ReplicationEndpointForTest ();
0 commit comments