Skip to content

Commit

Permalink
📝 Remove prefetch terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
TurpIF committed Jun 1, 2022
1 parent 33f174d commit 28a3ebb
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ internal object MockedDependencyProvider {
* This method can be called many times. Old mocks are erased and a new fresh dependency provider
* is setup.
*
* The Criteo SDK is not reinitialized (without any prefetched bids) so, you should reset it if already setup to not
* The Criteo SDK is not reinitialized so, you should reset it if already setup to not
* have issues in the dependency graph.
*/
@JvmStatic
Expand Down
4 changes: 1 addition & 3 deletions publisher-sdk/config.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ csmDirectoryName = 'criteo_metrics'
csmQueueFilename = 'criteo_metrics_queue'

// The batch size of metric files sent, at most, in each CSM requests.
// Bid requests are only bulked during the prefetch phase and CDB requests are split into chunks of,
// at most, 8 slots. This means that while CSM requests are emitted without issues, there should be,
// at most, 8 stored metrics. A batch size of 24 handles potential network issues and keeps the
// A batch size of 24 handles potential network issues and keeps the
// requests' size small (around 4KB given below estimation).
csmBatchSize = 24

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,25 +185,25 @@ public void setUp() {
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchValidBannerId_CriteoMacroAreInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndValidBannerId_CriteoMacroAreInjectedInDfpBuilder()
throws Exception {
whenGettingBid_GivenValidCpIdAndValidAdUnit_CriteoMacroAreInjectedInDfpBuilder(validBannerAdUnit, false);
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchValidInterstitialId_CriteoMacroAreInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndValidInterstitialId_CriteoMacroAreInjectedInDfpBuilder()
throws Exception {
whenGettingBid_GivenValidCpIdAndValidAdUnit_CriteoMacroAreInjectedInDfpBuilder(validInterstitialAdUnit, false);
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchValidInterstitialVideoId_CriteoMacroAreInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndValidInterstitialVideoId_CriteoMacroAreInjectedInDfpBuilder()
throws Exception {
whenGettingBid_GivenValidCpIdAndValidAdUnit_CriteoMacroAreInjectedInDfpBuilder(TestAdUnits.INTERSTITIAL_VIDEO, true);
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchValidRewardedVideoId_CriteoMacroAreInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndValidRewardedVideoId_CriteoMacroAreInjectedInDfpBuilder()
throws Exception {
givenInitializedCriteo(TestAdUnits.REWARDED);

Expand All @@ -226,7 +226,7 @@ private void whenGettingBid_GivenValidCpIdAndValidAdUnit_CriteoMacroAreInjectedI
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchValidNativeId_CriteoNativeMacroAreInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndValidNativeId_CriteoNativeMacroAreInjectedInDfpBuilder()
throws Exception {
givenInitializedCriteo(validNativeAdUnit);

Expand Down Expand Up @@ -261,27 +261,24 @@ public void whenGettingBid_GivenValidCpIdAndPrefetchValidNativeId_CriteoNativeMa
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchInvalidBannerId_CriteoMacroAreNotInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndInvalidBannerId_CriteoMacroAreNotInjectedInDfpBuilder()
throws Exception {
whenGettingBid_GivenValidCpIdAndPrefetchInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(
invalidBannerAdUnit);
whenGettingBid_GivenValidCpIdAndInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(invalidBannerAdUnit);
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchInvalidInterstitialId_CriteoMacroAreNotInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndInvalidInterstitialId_CriteoMacroAreNotInjectedInDfpBuilder()
throws Exception {
whenGettingBid_GivenValidCpIdAndPrefetchInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(
invalidInterstitialAdUnit);
whenGettingBid_GivenValidCpIdAndInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(invalidInterstitialAdUnit);
}

@Test
public void whenGettingBid_GivenValidCpIdAndPrefetchInvalidNativeId_CriteoMacroAreNotInjectedInDfpBuilder()
public void whenGettingBid_GivenValidCpIdAndInvalidNativeId_CriteoMacroAreNotInjectedInDfpBuilder()
throws Exception {
whenGettingBid_GivenValidCpIdAndPrefetchInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(
invalidNativeAdUnit);
whenGettingBid_GivenValidCpIdAndInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(invalidNativeAdUnit);
}

private void whenGettingBid_GivenValidCpIdAndPrefetchInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(
private void whenGettingBid_GivenValidCpIdAndInvalidAdUnit_CriteoMacroAreNotInjectedInDfpBuilder(
AdUnit adUnit)
throws Exception {
givenInitializedCriteo(adUnit);
Expand Down Expand Up @@ -314,22 +311,20 @@ private void whenGettingBid_GivenValidCpIdAndPrefetchInvalidAdUnit_CriteoMacroAr
}

@Test
public void whenGettingTestBid_GivenValidCpIdAndPrefetchDemoBannerId_CriteoMacroAreInjectedInDfpBuilder()
public void whenGettingTestBid_GivenValidCpIdAndDemoBannerId_CriteoMacroAreInjectedInDfpBuilder()
throws Exception {
givenUsingCdbProd();
whenGettingTestBid_GivenValidCpIdAndPrefetchDemoAdUnit_CriteoMacroAreInjectedInDfpBuilder(
demoBannerAdUnit);
whenGettingTestBid_GivenValidCpIdAndDemoAdUnit_CriteoMacroAreInjectedInDfpBuilder(demoBannerAdUnit);
}

@Test
public void whenGettingTestBid_GivenValidCpIdAndPrefetchDemoInterstitialId_CriteoMacroAreInjectedInDfpBuilder()
public void whenGettingTestBid_GivenValidCpIdAndDemoInterstitialId_CriteoMacroAreInjectedInDfpBuilder()
throws Exception {
givenUsingCdbProd();
whenGettingTestBid_GivenValidCpIdAndPrefetchDemoAdUnit_CriteoMacroAreInjectedInDfpBuilder(
demoInterstitialAdUnit);
whenGettingTestBid_GivenValidCpIdAndDemoAdUnit_CriteoMacroAreInjectedInDfpBuilder(demoInterstitialAdUnit);
}

private void whenGettingTestBid_GivenValidCpIdAndPrefetchDemoAdUnit_CriteoMacroAreInjectedInDfpBuilder(
private void whenGettingTestBid_GivenValidCpIdAndDemoAdUnit_CriteoMacroAreInjectedInDfpBuilder(
AdUnit adUnit)
throws Exception {
givenInitializedCriteo(adUnit);
Expand All @@ -346,20 +341,18 @@ private void whenGettingTestBid_GivenValidCpIdAndPrefetchDemoAdUnit_CriteoMacroA
}

@Test
public void whenEnrichingDisplayUrl_GivenValidCpIdAndPrefetchBannerId_DisplayUrlIsEncodedInASpecificManner()
public void whenEnrichingDisplayUrl_GivenValidCpIdAndBannerId_DisplayUrlIsEncodedInASpecificManner()
throws Exception {
whenEnrichingDisplayUrl_GivenValidCpIdAndPrefetchAdUnit_DisplayUrlIsEncodedInASpecificManner(
validBannerAdUnit);
whenEnrichingDisplayUrl_GivenValidCpIdAndAdUnit_DisplayUrlIsEncodedInASpecificManner(validBannerAdUnit);
}

@Test
public void whenEnrichingDisplayUrl_GivenValidCpIdAndPrefetchInterstitialId_DisplayUrlIsEncodedInASpecificManner()
public void whenEnrichingDisplayUrl_GivenValidCpIdAndInterstitialId_DisplayUrlIsEncodedInASpecificManner()
throws Exception {
whenEnrichingDisplayUrl_GivenValidCpIdAndPrefetchAdUnit_DisplayUrlIsEncodedInASpecificManner(
validInterstitialAdUnit);
whenEnrichingDisplayUrl_GivenValidCpIdAndAdUnit_DisplayUrlIsEncodedInASpecificManner(validInterstitialAdUnit);
}

private void whenEnrichingDisplayUrl_GivenValidCpIdAndPrefetchAdUnit_DisplayUrlIsEncodedInASpecificManner(
private void whenEnrichingDisplayUrl_GivenValidCpIdAndAdUnit_DisplayUrlIsEncodedInASpecificManner(
AdUnit adUnit)
throws Exception {
givenInitializedCriteo(adUnit);
Expand All @@ -375,7 +368,7 @@ private void whenEnrichingDisplayUrl_GivenValidCpIdAndPrefetchAdUnit_DisplayUrlI
}

@Test
public void whenEnrichingNativePayload_GivenValidCpIdAndPrefetchNative_PayloadIsEncodedInASpecificManner()
public void whenEnrichingNativePayload_GivenValidCpIdAndNative_PayloadIsEncodedInASpecificManner()
throws Exception {
NativeAssets expectedAssets = STUB_NATIVE_ASSETS;
NativeProduct expectedProduct = expectedAssets.getProduct();
Expand Down

0 comments on commit 28a3ebb

Please sign in to comment.