import com.google.common.base.Optional;
import com.google.common.util.concurrent.CheckedFuture;
import com.google.common.util.concurrent.ListenableFuture;
-
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
import javax.inject.Inject;
-
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
ItmConfig itmConfigObj = new ItmConfigBuilder().setDefTzEnabled(false).build();
// write into config DS
- txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> tx.put(iid, itmConfigObj, true));
- Thread.sleep(1000);
+ txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> tx.put(iid, itmConfigObj, true)).get();
// read from config DS
boolean defTzEnabled = SingleTransactionDataBroker.syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional(
ItmConfig itmConfigObj = new ItmConfigBuilder().setDefTzEnabled(true).build();
// write into config DS
- txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> tx.put(iid, itmConfigObj, true));
- Thread.sleep(1000);
+ txRunner.callWithNewWriteOnlyTransactionAndSubmit(CONFIGURATION, tx -> tx.put(iid, itmConfigObj, true)).get();
// read from config DS
boolean defTzEnabled = SingleTransactionDataBroker.syncReadOptionalAndTreatReadFailedExceptionAsAbsentOptional(
dataBroker, LogicalDatastoreType.CONFIGURATION, iid).get().isDefTzEnabled();
ItmTepAutoConfigTestUtil.addTep(ItmTestConstants.NB_TZ_TEP_IP,
ItmTestConstants.DEF_BR_DPID, ItmTestConstants.TZ_NAME, false, dataBroker, txRunner);
futures.get();
+ coordinatorEventsWaiter.awaitEventsConsumption();
IpPrefix subnetMaskObj = ItmUtils.getDummySubnet();
//check deleted tz moved to notHosted
InstanceIdentifier<TepsInNotHostedTransportZone> notHostedPath =
ItmTepAutoConfigTestUtil.getTepNotHostedInTZIid(ItmTestConstants.TZ_NAME);
-
+ coordinatorEventsWaiter.awaitEventsConsumption();
Assert.assertNotNull(notHostedPath);
Assert.assertEquals(ItmTestConstants.TZ_NAME, dataBroker.newReadOnlyTransaction()
.read(LogicalDatastoreType.OPERATIONAL, notHostedPath).checkedGet().get().getZoneName());