Fix build issue - onReceive test

This commit is contained in:
VenkataAparna Garlapati 2016-02-02 21:39:43 -08:00
Родитель 9efded6178
Коммит a1dd9c51ce
1 изменённых файлов: 12 добавлений и 8 удалений

Просмотреть файл

@ -1,8 +1,6 @@
package com.microsoft.azure.eventhubs.exceptioncontracts;
import java.util.Collection;
import java.util.concurrent.ExecutionException;
import org.junit.Assume;
import org.junit.Test;
@ -29,7 +27,8 @@ public class ReceiverEpoch extends TestBase
String cgName = eventHubInfo.getRandomConsumerGroup();
String partitionId = "0";
long epoch = 345632;
ehClient.createEpochReceiver(cgName, partitionId, PartitionReceiver.StartOfStream, false, epoch, new EventCounter()).get();
PartitionReceiver receiver = ehClient.createEpochReceiver(cgName, partitionId, PartitionReceiver.StartOfStream, false, epoch).get();
receiver.setReceiveHandler(new EventCounter());
try
{
@ -51,7 +50,7 @@ public class ReceiverEpoch extends TestBase
}
}
public static final class EventCounter extends ReceiveHandler
public static final class EventCounter extends PartitionReceiveHandler
{
private long count;
@ -61,7 +60,7 @@ public class ReceiverEpoch extends TestBase
}
@Override
public void onReceive(Collection<EventData> events)
public void onReceive(Iterable<EventData> events)
{
for(EventData event: events)
{
@ -72,5 +71,10 @@ public class ReceiverEpoch extends TestBase
count++;
}
@Override
public void onError(Exception exception)
{
}
}
}