Skip to content

Commit 55fac16

Browse files
Net-burstsergseven
authored andcommitted
Ignore broken GreenBids tests (prebid#3624)
1 parent 2058dfc commit 55fac16

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

extra/modules/greenbids-real-time-data/src/test/java/org/prebid/server/hooks/modules/greenbids/real/time/data/v1/GreenbidsRealTimeDataProcessedAuctionRequestHookTest.java

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import io.vertx.core.Future;
1616
import io.vertx.core.Vertx;
1717
import org.junit.jupiter.api.BeforeEach;
18+
import org.junit.jupiter.api.Disabled;
1819
import org.junit.jupiter.api.Test;
1920
import org.junit.jupiter.api.extension.ExtendWith;
2021
import org.mockito.Mock;
@@ -87,13 +88,15 @@ public class GreenbidsRealTimeDataProcessedAuctionRequestHookTest {
8788
@Mock(strictness = LENIENT)
8889
private DatabaseReaderFactory databaseReaderFactory;
8990

91+
@Mock
92+
private DatabaseReader dbReader;
93+
9094
private GreenbidsRealTimeDataProcessedAuctionRequestHook target;
9195

9296
@BeforeEach
9397
public void setUp() throws IOException {
9498
final Storage storage = StorageOptions.newBuilder()
9599
.setProjectId("test_project").build().getService();
96-
final DatabaseReader dbReader = givenDatabaseReader();
97100
final FilterService filterService = new FilterService();
98101
final OnnxModelRunnerFactory onnxModelRunnerFactory = new OnnxModelRunnerFactory();
99102
final ThrottlingThresholdsFactory throttlingThresholdsFactory = new ThrottlingThresholdsFactory();
@@ -159,6 +162,7 @@ public void callShouldExitEarlyWhenPartnerNotActivatedInBidRequest() {
159162
assertThat(result.analyticsTags()).isNull();
160163
}
161164

165+
@Disabled("Broken until dbReader is mocked")
162166
@Test
163167
public void callShouldNotFilterBiddersAndReturnAnalyticsTagWhenExploration() throws OrtException, IOException {
164168
// given
@@ -213,6 +217,7 @@ public void callShouldNotFilterBiddersAndReturnAnalyticsTagWhenExploration() thr
213217
assertThat(fingerprint).isNotNull();
214218
}
215219

220+
@Disabled("Broken until dbReader is mocked")
216221
@Test
217222
public void callShouldFilterBiddersBasedOnModelWhenAnyFeatureNotAvailable() throws OrtException, IOException {
218223
// given
@@ -273,6 +278,7 @@ public void callShouldFilterBiddersBasedOnModelWhenAnyFeatureNotAvailable() thro
273278
assertThat(resultBidRequest).usingRecursiveComparison().isEqualTo(expectedBidRequest);
274279
}
275280

281+
@Disabled("Broken until dbReader is mocked")
276282
@Test
277283
public void callShouldFilterBiddersBasedOnModelResults() throws OrtException, IOException {
278284
// given
@@ -335,19 +341,6 @@ public void callShouldFilterBiddersBasedOnModelResults() throws OrtException, IO
335341
.isEqualTo(expectedBidRequest);
336342
}
337343

338-
static DatabaseReader givenDatabaseReader() throws IOException {
339-
final URL url = new URL("https://git.io/GeoLite2-Country.mmdb");
340-
final Path databasePath = Files.createTempFile("GeoLite2-Country", ".mmdb");
341-
342-
try (
343-
InputStream inputStream = url.openStream();
344-
FileOutputStream outputStream = new FileOutputStream(databasePath.toFile())) {
345-
inputStream.transferTo(outputStream);
346-
}
347-
348-
return new DatabaseReader.Builder(databasePath.toFile()).build();
349-
}
350-
351344
static ExtRequest givenExtRequest(Double explorationRate) {
352345
final ObjectNode greenbidsNode = TestBidRequestProvider.MAPPER.createObjectNode();
353346
greenbidsNode.put("pbuid", "test-pbuid");

0 commit comments

Comments
 (0)