A very simple code like the following:
Amplitude client = Amplitude.getInstance();
client.init(".....");
Event e = new Event("TestEvent","TestUser");
client.logEvent(e);
client.flushEvents();
client.shutdown();
The event can be sent to amplitude when I run these code in a java main() method, but cannot in a test unit.
There is no any errors when running a test unit, just cannot see the events in amplitude.
Is there anything I should concern ? I notice that the Amplitude SDK use a new Thread to send the event to amplitude, is that related with my issue?
Thanks.