From d52ad69d5ca1a62272332771703a6e58e839c811 Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 24 Feb 2025 13:36:13 -0800
Subject: [PATCH 01/10] Update pom.xml
---
extra/pom.xml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/extra/pom.xml b/extra/pom.xml
index 6ea6fddf3ce..d69947f4fb0 100644
--- a/extra/pom.xml
+++ b/extra/pom.xml
@@ -36,19 +36,20 @@
2.0.1.Final
4.4
1.26.0
+ 1.3.5
3.6.1
2.1
4.5.14
5.3.1
6.4.5
- 1.0.76
+ 1.4.0
1.13
2.2.0
1.2.2
0.16.0
2.0.10
3.2.0
- 2.12.0
+ 2.17.0
3.25.5
${protobuf.version}
1.0.7
@@ -120,6 +121,11 @@
commons-compress
${commons.compress.version}
+
+ commons-logging
+ commons-logging
+ ${commons-logging.version}
+
org.apache.commons
commons-math3
From cd9903a018c868953874d271707d439db99eca21 Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 24 Feb 2025 13:37:56 -0800
Subject: [PATCH 02/10] Update MaxMindGeoLocationServiceTest.java
Update negative tests for expected number of result messages.
---
.../MaxMindGeoLocationServiceTest.java | 57 ++++++++++++-------
1 file changed, 36 insertions(+), 21 deletions(-)
diff --git a/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java b/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java
index 26c84310934..4875efe47da 100644
--- a/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java
+++ b/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java
@@ -16,7 +16,6 @@
import org.prebid.server.geolocation.model.GeoInfo;
import java.io.IOException;
-import java.util.ArrayList;
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
@@ -62,21 +61,37 @@ public void setDatabaseReaderShouldReturnFailedFutureIfDatabaseArchiveNotFound()
public void lookupShouldReturnCountryIsoWhenDatabaseReaderWasSet() throws NoSuchFieldException, IOException,
GeoIp2Exception, IllegalAccessException {
// given
- final Country country = new Country(null, null, null, "fr", null);
- final Continent continent = new Continent(null, "eu", null, null);
- final City city = new City(singletonList("test"), null, null, singletonMap("test", "Paris"));
- final Location location = new Location(null, null, 48.8566, 2.3522,
- null, null, null);
- final ArrayList subdivisions = new ArrayList<>();
- subdivisions.add(new Subdivision(null, null, null, "paris", null));
- final CityResponse cityResponse = new CityResponse(city, continent, country, location, null,
- null, null, null, subdivisions, null);
+ final Country country = Mockito.mock(Country.class);
+ Mockito.when(country.getIsoCode()).thenReturn("fr");
+
+ final Continent continent = Mockito.mock(Continent.class);
+ Mockito.when(continent.getCode()).thenReturn("eu");
+
+ final City city = Mockito.mock(City.class);
+ Mockito.when(city.getNames()).thenReturn(singletonMap("en", "Paris"));
+ Mockito.when(city.getName()).thenReturn("Paris");
+
+ final Location location = Mockito.mock(Location.class);
+ Mockito.when(location.getLatitude()).thenReturn(48.8566);
+ Mockito.when(location.getLongitude()).thenReturn(2.3522);
+
+ final Subdivision subdivision = Mockito.mock(Subdivision.class);
+ Mockito.when(subdivision.getIsoCode()).thenReturn("paris");
+
+ final CityResponse cityResponse = Mockito.mock(CityResponse.class);
+ Mockito.when(cityResponse.getCountry()).thenReturn(country);
+ Mockito.when(cityResponse.getContinent()).thenReturn(continent);
+ Mockito.when(cityResponse.getCity()).thenReturn(city);
+ Mockito.when(cityResponse.getLocation()).thenReturn(location);
+ Mockito.when(cityResponse.getSubdivisions()).thenReturn(singletonList(subdivision));
final DatabaseReader databaseReader = Mockito.mock(DatabaseReader.class);
given(databaseReader.city(any())).willReturn(cityResponse);
- new ReflectionMemberAccessor().set(maxMindGeoLocationService.getClass().getDeclaredField("databaseReader"),
- maxMindGeoLocationService, databaseReader);
+ new ReflectionMemberAccessor().set(
+ maxMindGeoLocationService.getClass().getDeclaredField("databaseReader"),
+ maxMindGeoLocationService,
+ databaseReader);
// when
final Future future = maxMindGeoLocationService.lookup(TEST_IP, null);
@@ -84,15 +99,15 @@ public void lookupShouldReturnCountryIsoWhenDatabaseReaderWasSet() throws NoSuch
// then
assertThat(future.succeeded()).isTrue();
assertThat(future.result())
- .isEqualTo(GeoInfo.builder()
- .vendor("maxmind")
- .continent("eu")
- .country("fr")
- .region("paris")
- .city("Paris")
- .lat(48.8566f)
- .lon(2.3522f)
- .build());
+ .isEqualTo(GeoInfo.builder()
+ .vendor("maxmind")
+ .continent("eu")
+ .country("fr")
+ .region("paris")
+ .city("Paris")
+ .lat(48.8566f)
+ .lon(2.3522f)
+ .build());
}
@Test
From 8fce85dfe112c946ab076f048f15fad680a4d7ad Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 24 Feb 2025 13:39:40 -0800
Subject: [PATCH 03/10] Update BidderParamValidatorTest.java
---
.../server/validation/BidderParamValidatorTest.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java b/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java
index c0b99d22f38..9c207aa17bf 100644
--- a/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java
+++ b/src/test/java/org/prebid/server/validation/BidderParamValidatorTest.java
@@ -133,7 +133,7 @@ public void validateShouldReturnValidationMessagesWhenAppnexusImpExtNotValid() {
final Set messages = bidderParamValidator.validate(APPNEXUS, node);
// then
- assertThat(messages.size()).isEqualTo(4);
+ assertThat(messages.size()).isEqualTo(5);
}
@Test
@@ -161,7 +161,7 @@ public void validateShouldReturnValidationMessagesWhenAppnexusAliasImpExtNotVali
final Set messages = bidderParamValidator.validate(APPNEXUS_ALIAS, node);
// then
- assertThat(messages.size()).isEqualTo(4);
+ assertThat(messages.size()).isEqualTo(5);
}
@Test
@@ -201,7 +201,7 @@ public void validateShouldReturnValidationMessagesWhenSovrnExtNotValid() {
final Set messages = bidderParamValidator.validate(SOVRN, node);
// then
- assertThat(messages.size()).isEqualTo(2);
+ assertThat(messages.size()).isEqualTo(3);
}
@Test
@@ -339,7 +339,7 @@ public void validateShouldReturnValidationMessagesWhenBeachfrontExtNotValid() {
final Set messages = bidderParamValidator.validate(BEACHFRONT, node);
// then
- assertThat(messages.size()).isEqualTo(2);
+ assertThat(messages.size()).isEqualTo(3);
}
@Test
From 0f04eca86a612aa660a4a487d09e3d5e67c6653b Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 24 Feb 2025 14:21:05 -0800
Subject: [PATCH 04/10] Update pom.xml
---
extra/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/extra/pom.xml b/extra/pom.xml
index d69947f4fb0..7fa98b12a93 100644
--- a/extra/pom.xml
+++ b/extra/pom.xml
@@ -45,7 +45,7 @@
1.4.0
1.13
2.2.0
- 1.2.2
+ 1.2.3
0.16.0
2.0.10
3.2.0
From 27546369818d4b5eec759951816766c1fa45af6a Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 24 Feb 2025 15:24:52 -0800
Subject: [PATCH 05/10] Update pom.xml
---
extra/pom.xml | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/extra/pom.xml b/extra/pom.xml
index 7fa98b12a93..baed2e4e596 100644
--- a/extra/pom.xml
+++ b/extra/pom.xml
@@ -44,8 +44,9 @@
6.4.5
1.4.0
1.13
+ 2.1.1
2.2.0
- 1.2.3
+ 1.2.2
0.16.0
2.0.10
3.2.0
@@ -189,6 +190,11 @@
+
+ org.apache.kafka
+ kafka-clients
+ ${kafka-clients.version}
+
io.prometheus
simpleclient_vertx4
From aa73fb7e4ec89ee341db3ce1ba3edc1259abce56 Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 24 Feb 2025 15:50:05 -0800
Subject: [PATCH 06/10] Revert pom.xml
---
extra/pom.xml | 6 ------
1 file changed, 6 deletions(-)
diff --git a/extra/pom.xml b/extra/pom.xml
index baed2e4e596..d69947f4fb0 100644
--- a/extra/pom.xml
+++ b/extra/pom.xml
@@ -44,7 +44,6 @@
6.4.5
1.4.0
1.13
- 2.1.1
2.2.0
1.2.2
0.16.0
@@ -190,11 +189,6 @@
-
- org.apache.kafka
- kafka-clients
- ${kafka-clients.version}
-
io.prometheus
simpleclient_vertx4
From 8898715bf0cda75a0a9a75b8dc9a9e4d08803965 Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Wed, 26 Feb 2025 16:12:21 -0800
Subject: [PATCH 07/10] Update AliasSpec.groovy
---
.../prebid/server/functional/tests/AliasSpec.groovy | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy
index 1ead8c32708..4e544498f44 100644
--- a/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy
+++ b/src/test/groovy/org/prebid/server/functional/tests/AliasSpec.groovy
@@ -228,11 +228,12 @@ class AliasSpec extends BaseSpec {
assert bidResponse.ext?.warnings[PREBID]*.message ==
["WARNING: request.imp[0].ext.prebid.bidder.${APPNEXUS.value} was dropped with a reason: " +
"request.imp[0].ext.prebid.bidder.${APPNEXUS.value} failed validation.\n" +
- "\$.placement_id: is missing but it is required\n" +
- "\$.member: is missing but it is required\n" +
- "\$.placementId: is missing but it is required\n" +
- "\$.inv_code: is missing but it is required\n" +
- "\$.invCode: is missing but it is required",
+ "\$: must be valid to one and only one schema, but 0 are valid\n" +
+ "\$: required property 'placement_id' not found\n" +
+ "\$: required property 'inv_code' not found\n" +
+ "\$: required property 'placementId' not found\n" +
+ "\$: required property 'member' not found\n" +
+ "\$: required property 'invCode' not found",
"WARNING: request.imp[0].ext must contain at least one valid bidder"]
}
From 75160cf3a239f49da9867d83aa7348f889d8ea69 Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 3 Mar 2025 15:13:58 -0800
Subject: [PATCH 08/10] Update pom.xml
Remove pinned commons-logging version. Add exclusions to httpclient and mockserver-client-java.
---
extra/pom.xml | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/extra/pom.xml b/extra/pom.xml
index d69947f4fb0..89a23926471 100644
--- a/extra/pom.xml
+++ b/extra/pom.xml
@@ -36,7 +36,6 @@
2.0.1.Final
4.4
1.26.0
- 1.3.5
3.6.1
2.1
4.5.14
@@ -121,11 +120,6 @@
commons-compress
${commons.compress.version}
-
- commons-logging
- commons-logging
- ${commons-logging.version}
-
org.apache.commons
commons-math3
@@ -136,6 +130,12 @@
org.apache.httpcomponents
httpclient
${httpclient.version}
+
+
+ commons-logging
+ commons-logging
+
+
com.github.seancfoley
@@ -254,6 +254,10 @@
com.google.code.findbugs
jsr305
+
+ commons-logging
+ commons-logging
+
From 1288f09a124d5693d44bb0eed1fed1f055af7d40 Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 3 Mar 2025 15:15:30 -0800
Subject: [PATCH 09/10] Update pom.xml
Add exclusion for commons-logging.
---
extra/modules/greenbids-real-time-data/pom.xml | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/extra/modules/greenbids-real-time-data/pom.xml b/extra/modules/greenbids-real-time-data/pom.xml
index 7e8c9f8e095..c4dd9fd52f3 100644
--- a/extra/modules/greenbids-real-time-data/pom.xml
+++ b/extra/modules/greenbids-real-time-data/pom.xml
@@ -29,6 +29,12 @@
com.google.cloud
google-cloud-storage
2.41.0
+
+
+ commons-logging
+ commons-logging
+
+
From 2ec7db7dd6d3c74a5e9a6fdf386436636acfa797 Mon Sep 17 00:00:00 2001
From: Jim Thario <33331284+JimTharioAmazon@users.noreply.github.com>
Date: Mon, 3 Mar 2025 16:26:33 -0800
Subject: [PATCH 10/10] Update MaxMindGeoLocationServiceTest.java
Fixed indentation.
---
.../MaxMindGeoLocationServiceTest.java | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java b/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java
index 4875efe47da..d296dbb19a2 100644
--- a/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java
+++ b/src/test/java/org/prebid/server/geolocation/MaxMindGeoLocationServiceTest.java
@@ -89,9 +89,9 @@ public void lookupShouldReturnCountryIsoWhenDatabaseReaderWasSet() throws NoSuch
given(databaseReader.city(any())).willReturn(cityResponse);
new ReflectionMemberAccessor().set(
- maxMindGeoLocationService.getClass().getDeclaredField("databaseReader"),
- maxMindGeoLocationService,
- databaseReader);
+ maxMindGeoLocationService.getClass().getDeclaredField("databaseReader"),
+ maxMindGeoLocationService,
+ databaseReader);
// when
final Future future = maxMindGeoLocationService.lookup(TEST_IP, null);
@@ -99,15 +99,15 @@ public void lookupShouldReturnCountryIsoWhenDatabaseReaderWasSet() throws NoSuch
// then
assertThat(future.succeeded()).isTrue();
assertThat(future.result())
- .isEqualTo(GeoInfo.builder()
- .vendor("maxmind")
- .continent("eu")
- .country("fr")
- .region("paris")
- .city("Paris")
- .lat(48.8566f)
- .lon(2.3522f)
- .build());
+ .isEqualTo(GeoInfo.builder()
+ .vendor("maxmind")
+ .continent("eu")
+ .country("fr")
+ .region("paris")
+ .city("Paris")
+ .lat(48.8566f)
+ .lon(2.3522f)
+ .build());
}
@Test