From b12c3a356c862d058ec46c865ddf48327f52f42c Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Tue, 15 Mar 2022 07:47:30 +0200 Subject: [PATCH 1/2] Remove ignore case for ui tests --- .../com/cloudinary/android/preprocess/PreprocessTest.java | 4 ---- .../java/cloudinary/android/sample/UploadWidgetTest.java | 2 -- 2 files changed, 6 deletions(-) diff --git a/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java b/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java index 9e7240eb..47c54b40 100644 --- a/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java +++ b/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java @@ -258,8 +258,6 @@ public Boolean call() { MediaManager.get().unregisterCallback(statefulCallback); } - // TODO: Fix transcoding tests in travis - @Ignore @Test public void testTranscode() throws IOException, PreprocessException { Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); @@ -281,8 +279,6 @@ public void testTranscode() throws IOException, PreprocessException { Assert.assertTrue(targetVideoFile.length() > 0); } - // TODO: Fix transcoding tests in travis - @Ignore @Test public void testVideoChain() throws IOException, PreprocessException, PayloadNotFoundException { Context context = InstrumentationRegistry.getInstrumentation().getTargetContext(); diff --git a/sample/src/androidTest/java/cloudinary/android/sample/UploadWidgetTest.java b/sample/src/androidTest/java/cloudinary/android/sample/UploadWidgetTest.java index f5621b9e..19f11f1b 100644 --- a/sample/src/androidTest/java/cloudinary/android/sample/UploadWidgetTest.java +++ b/sample/src/androidTest/java/cloudinary/android/sample/UploadWidgetTest.java @@ -38,8 +38,6 @@ public static void setup() throws IOException { @Rule public IntentsTestRule intentsTestRule = new IntentsTestRule<>(MainActivity.class); - // TODO: Fix UI tests for travis - @Ignore("Not supported by Travis") @Test public void testUploadWidget() { UploadWidget.startActivity(intentsTestRule.getActivity(), From a917936f9b5fd4651699257f075816b869a38036 Mon Sep 17 00:00:00 2001 From: adimiz1 Date: Tue, 15 Mar 2022 08:36:50 +0200 Subject: [PATCH 2/2] Fix tests --- .../com/cloudinary/android/preprocess/PreprocessTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java b/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java index 47c54b40..7fced0b3 100644 --- a/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java +++ b/preprocess/src/androidTest/java/com/cloudinary/android/preprocess/PreprocessTest.java @@ -271,7 +271,7 @@ public void testTranscode() throws IOException, PreprocessException { parameters.setHeight(720); parameters.setKeyFramesInterval(3); parameters.setTargetAudioBitrateKbps(128); - parameters.setTargetVideoBitrateKbps((int) (3.3 * 1024 * 1024)); + parameters.setTargetVideoBitrateKbps((3 * 1024 * 1024)); Uri outputVideoUri = new Transcode(parameters).execute(context, videoUri); File targetVideoFile = new File(outputVideoUri.getPath()); @@ -292,7 +292,7 @@ public void testVideoChain() throws IOException, PreprocessException, PayloadNot parameters.setHeight(720); parameters.setKeyFramesInterval(3); parameters.setTargetAudioBitrateKbps(128); - parameters.setTargetVideoBitrateKbps((int) (3.3 * 1024 * 1024)); + parameters.setTargetVideoBitrateKbps( (3 * 1024 * 1024)); VideoPreprocessChain chain = VideoPreprocessChain.videoTranscodingChain(parameters); String outputVideoPath = chain.execute(context, payload);