use of com.hazelcast.simulator.worker.metronome.BusySpinningMetronome in project hazelcast-simulator by hazelcast.
the class MetronomeConstructorTest method withCustomMetronome.
@Test
public void withCustomMetronome() {
PropertyBinding propertyBinding = new PropertyBinding(new TestCase("foo").setProperty("interval", "10ns").setProperty("metronomeClass", BusySpinningMetronome.class));
MetronomeConstructor metronomeConstructor = new MetronomeConstructor("", propertyBinding, 1);
Metronome m = metronomeConstructor.newInstance();
assertEquals(BusySpinningMetronome.class, m.getClass());
BusySpinningMetronome metronome = (BusySpinningMetronome) m;
assertEquals(10, metronome.getIntervalNanos());
}
Aggregations