Now C-API allows setting 0 timeout val, change condition to set timeout value.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
}
@Test
- public void testSetZeroTimeout_n() {
- if (!NNStreamer.isAvailable(NNStreamer.NNFWType.TENSORFLOW_LITE)) {
- /* cannot run the test */
- return;
- }
-
- try {
- SingleShot single = new SingleShot(APITestCommon.getTFLiteImgModel());
-
- single.setTimeout(0);
- fail();
- } catch (Exception e) {
- /* expected */
- }
- }
-
- @Test
public void testSetInvalidTimeout_n() {
if (!NNStreamer.isAvailable(NNStreamer.NNFWType.TENSORFLOW_LITE)) {
/* cannot run the test */
public void setTimeout(int timeout) {
checkPipelineHandle();
- if (timeout <= 0) {
+ if (timeout < 0) {
throw new IllegalArgumentException("Given timeout is invalid");
}