From 07a8129a737e6090e4c6209604e5d80e29566284 Mon Sep 17 00:00:00 2001 From: yausername <13ritvik@gmail.com> Date: Sat, 23 Mar 2019 19:11:19 +0530 Subject: [PATCH] fixed peertube search test --- .../services/peertube/search/PeertubeSearchQHTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/search/PeertubeSearchQHTest.java b/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/search/PeertubeSearchQHTest.java index 89680d609..5f5a91f39 100644 --- a/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/search/PeertubeSearchQHTest.java +++ b/extractor/src/test/java/org/schabi/newpipe/extractor/services/peertube/search/PeertubeSearchQHTest.java @@ -3,9 +3,16 @@ package org.schabi.newpipe.extractor.services.peertube.search; import static org.junit.Assert.assertEquals; import static org.schabi.newpipe.extractor.ServiceList.PeerTube; +import org.junit.BeforeClass; import org.junit.Test; public class PeertubeSearchQHTest { + + @BeforeClass + public static void setUpClass() throws Exception { + // setting instance might break test when running in parallel + PeerTube.setInstance("https://peertube.mastodon.host", "PeerTube on Mastodon.host"); + } @Test public void testRegularValues() throws Exception { @@ -15,4 +22,4 @@ public class PeertubeSearchQHTest { assertEquals("https://peertube.mastodon.host/api/v1/search/videos?search=G%C3%BCl%C3%BCm", PeerTube.getSearchQHFactory().fromQuery("Gülüm").getUrl()); assertEquals("https://peertube.mastodon.host/api/v1/search/videos?search=%3Fj%24%29H%C2%A7B", PeerTube.getSearchQHFactory().fromQuery("?j$)H§B").getUrl()); } -} +} \ No newline at end of file