|
5 | 5 | import org.junit.Test; |
6 | 6 | import org.mockito.Mockito; |
7 | 7 | import org.tron.common.utils.ReflectUtils; |
| 8 | +import org.tron.core.capsule.BlockCapsule; |
8 | 9 | import org.tron.core.db.Manager; |
| 10 | +import org.tron.core.services.event.BlockEventCache; |
9 | 11 | import org.tron.core.services.event.BlockEventLoad; |
10 | 12 | import org.tron.core.services.event.EventService; |
11 | 13 | import org.tron.core.services.event.HistoryEventService; |
12 | 14 | import org.tron.core.services.event.RealtimeEventService; |
| 15 | +import org.tron.core.services.event.SolidEventService; |
13 | 16 |
|
14 | 17 | public class EventServiceTest { |
15 | 18 |
|
16 | 19 | @Test |
17 | 20 | public void test() { |
| 21 | + BlockCapsule.BlockId b1 = new BlockCapsule.BlockId(BlockEventCacheTest.getBlockId(), 1); |
| 22 | + BlockEventCache.init(b1); |
| 23 | + |
18 | 24 | EventService eventService = new EventService(); |
19 | 25 | HistoryEventService historyEventService = new HistoryEventService(); |
20 | 26 | RealtimeEventService realtimeEventService = new RealtimeEventService(); |
| 27 | + SolidEventService solidEventService = new SolidEventService(); |
21 | 28 | BlockEventLoad blockEventLoad = new BlockEventLoad(); |
22 | 29 |
|
23 | 30 | ReflectUtils.setFieldValue(eventService, "historyEventService", historyEventService); |
| 31 | + ReflectUtils.setFieldValue(eventService, "solidEventService", solidEventService); |
24 | 32 | ReflectUtils.setFieldValue(eventService, "realtimeEventService", realtimeEventService); |
25 | 33 | ReflectUtils.setFieldValue(eventService, "blockEventLoad", blockEventLoad); |
26 | 34 |
|
|
0 commit comments