Skip to content

Commit 78540db

Browse files
Final fixes
1 parent a0c4fd0 commit 78540db

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

client/src/main/java/io/split/engine/common/SyncManagerImp.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public void start() {
105105
Thread.currentThread().sleep(1000);
106106
} catch (InterruptedException e) {
107107
_log.warn("Sdk Initializer thread interrupted");
108-
e.printStackTrace();
109108
Thread.currentThread().interrupt();
110109
}
111110
}

client/src/test/java/io/split/engine/segments/SegmentSynchronizationTaskImpTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ public void testFetchAllAsynchronousAndGetFalse() throws NoSuchFieldException, I
100100
Mockito.doNothing().when(segmentFetcher).callLoopRun(Mockito.anyBoolean(),Mockito.anyBoolean());
101101

102102
// Before executing, we'll update the map of segmentFecthers via reflection.
103-
Field backoffBase = SegmentSynchronizationTaskImp.class.getDeclaredField("_segmentFetchers");
104-
backoffBase.setAccessible(true);
103+
Field segmentFetchersForced = SegmentSynchronizationTaskImp.class.getDeclaredField("_segmentFetchers");
104+
segmentFetchersForced.setAccessible(true);
105105
Field modifiersField = Field.class.getDeclaredField("modifiers");
106106
modifiersField.setAccessible(true);
107-
modifiersField.setInt(backoffBase, backoffBase.getModifiers() & ~Modifier.FINAL);
107+
modifiersField.setInt(segmentFetchersForced, segmentFetchersForced.getModifiers() & ~Modifier.FINAL);
108108

109-
backoffBase.set(fetchers, _segmentFetchers); // 1ms
109+
segmentFetchersForced.set(fetchers, _segmentFetchers); // 1ms
110110
fetcher1.set(segmentFetcher);
111111
boolean fetch = fetchers.fetchAllSynchronous();
112112
Assert.assertEquals(false, fetch);
@@ -122,11 +122,11 @@ public void testFetchAllAsynchronousAndGetTrue() throws NoSuchFieldException, Il
122122
final SegmentSynchronizationTaskImp fetchers = new SegmentSynchronizationTaskImp(segmentChangeFetcher, 1L, 1, gates, segmentCache, TELEMETRY_STORAGE);
123123

124124
// Before executing, we'll update the map of segmentFecthers via reflection.
125-
Field backoffBase = SegmentSynchronizationTaskImp.class.getDeclaredField("_segmentFetchers");
126-
backoffBase.setAccessible(true);
125+
Field segmentFetchersForced = SegmentSynchronizationTaskImp.class.getDeclaredField("_segmentFetchers");
126+
segmentFetchersForced.setAccessible(true);
127127
Field modifiersField = Field.class.getDeclaredField("modifiers");
128128
modifiersField.setAccessible(true);
129-
modifiersField.setInt(backoffBase, backoffBase.getModifiers() & ~Modifier.FINAL);
129+
modifiersField.setInt(segmentFetchersForced, segmentFetchersForced.getModifiers() & ~Modifier.FINAL);
130130
Mockito.doNothing().when(segmentFetcher).callLoopRun(Mockito.anyBoolean(),Mockito.anyBoolean());
131131
Mockito.when(segmentFetcher.runWhitCacheHeader()).thenReturn(true);
132132
Mockito.when(segmentFetcher.fetchAndUpdate(Mockito.anyBoolean())).thenReturn(true);

0 commit comments

Comments
 (0)