Skip to content

Commit

Permalink
Adjust test so that it can be run on develop to show the failure
Browse files Browse the repository at this point in the history
  • Loading branch information
guperrot committed Oct 20, 2018
1 parent 6abb30d commit 404d82f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.powermock.core.classloader.annotations.PrepareForTest;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
Expand Down Expand Up @@ -615,7 +614,7 @@ public void overridingPartAIsNotRetroactive() {
/* Start analytics and simulate background thread handler (we hold the thread command and run it in the test). */
Analytics analytics = Analytics.getInstance();
AppCenterHandler handler = mock(AppCenterHandler.class);
final Collection<Runnable> backgroundCommands = new LinkedList<>();
final LinkedList<Runnable> backgroundCommands = new LinkedList<>();
doAnswer(new Answer() {

@Override
Expand All @@ -630,6 +629,9 @@ public Object answer(InvocationOnMock invocation) {
/* Create a target. */
AnalyticsTransmissionTarget target = Analytics.getTransmissionTarget("test");

/* Init target background code now. */
backgroundCommands.removeFirst().run();

/* Simulate a track event call with no property. */
CommonSchemaLog logBeforeSetProperty = new CommonSchemaEventLog();
logBeforeSetProperty.setExt(new Extensions());
Expand Down

0 comments on commit 404d82f

Please sign in to comment.