A very simple code like the following:
Amplitude client = Amplitude.getInstance();<br /> client.init(".....");<br /> Event e = new Event("TestEvent","TestUser");<br /> client.logEvent(e);<br /> client.flushEvents();<br /> 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.