*/
@NonNullByDefault
public class TeleinfoInputStreamTest {
+ private static final int TIMEOUT_US = 5000000;
@Test
public void testReadNextFrameCbetmBase1() throws Exception {
try (TeleinfoInputStream in = new TeleinfoInputStream(
- new FileInputStream(TestUtils.getTestFile("cbetm-base-option-1.raw")))) {
+ new FileInputStream(TestUtils.getTestFile("cbetm-base-option-1.raw")), TIMEOUT_US, TIMEOUT_US, false)) {
Frame frame = in.readNextFrame();
assertNotNull(frame);
@Test
public void testReadNextFrameCbemmEvoIccHc1() throws Exception {
try (TeleinfoInputStream in = new TeleinfoInputStream(
- new FileInputStream(TestUtils.getTestFile("cbemm-evo-icc-hc-option-1.raw")))) {
+ new FileInputStream(TestUtils.getTestFile("cbemm-evo-icc-hc-option-1.raw")), TIMEOUT_US, TIMEOUT_US,
+ false)) {
Frame frame = in.readNextFrame();
assertNotNull(frame);
@Test
public void testReadNextFrameCbetmEjp1() throws Exception {
try (TeleinfoInputStream in = new TeleinfoInputStream(
- new FileInputStream(TestUtils.getTestFile("cbetm-ejp-option-1.raw")))) {
+ new FileInputStream(TestUtils.getTestFile("cbetm-ejp-option-1.raw")), TIMEOUT_US, TIMEOUT_US, false)) {
Frame frame = in.readNextFrame();
assertNotNull(frame);
@Test
public void testReadNextFrameCbemmEvoIccTempo1() throws Exception {
try (TeleinfoInputStream in = new TeleinfoInputStream(
- new FileInputStream(TestUtils.getTestFile("cbemm-evo-icc-tempo-option-1.raw")))) {
+ new FileInputStream(TestUtils.getTestFile("cbemm-evo-icc-tempo-option-1.raw")), TIMEOUT_US, TIMEOUT_US,
+ false)) {
Frame frame = in.readNextFrame();
assertNotNull(frame);
@Test
public void testReadNextFrameCbemmEvoIccBase1() throws Exception {
try (TeleinfoInputStream in = new TeleinfoInputStream(
- new FileInputStream(TestUtils.getTestFile("cbemm-evo-icc-base-option-1.raw")))) {
+ new FileInputStream(TestUtils.getTestFile("cbemm-evo-icc-base-option-1.raw")), TIMEOUT_US, TIMEOUT_US,
+ false)) {
Frame frame = in.readNextFrame();
assertNotNull(frame);
assertEquals(FrameCbemmEvolutionIccBaseOption.class, frame.getClass());
@Test
public void testInvalidADPSgrouplineWithAutoRepairActivated() throws Exception {
try (TeleinfoInputStream in = new TeleinfoInputStream(
- new FileInputStream(TestUtils.getTestFile("invalid-adps-groupline.raw")), true)) {
+ new FileInputStream(TestUtils.getTestFile("invalid-adps-groupline.raw")), TIMEOUT_US, TIMEOUT_US,
+ true)) {
Frame frame = in.readNextFrame();
assertNotNull(frame);