Skip to content

Commit

Permalink
Revert "update after review"
Browse files Browse the repository at this point in the history
This reverts commit d750dc8.
  • Loading branch information
osulzhenko committed Jan 28, 2025
1 parent d750dc8 commit 34022e9
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import org.prebid.server.functional.testcontainers.scaffolding.PrebidCache
import org.prebid.server.functional.testcontainers.scaffolding.VendorList
import org.prebid.server.functional.util.ObjectMapperWrapper
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared
import spock.lang.Specification

import static java.math.RoundingMode.DOWN
Expand All @@ -43,6 +44,7 @@ abstract class BaseSpec extends Specification implements ObjectMapperWrapper {
protected static final Map<String, String> GENERIC_ALIAS_CONFIG = ["adapters.generic.aliases.alias.enabled" : "true",
"adapters.generic.aliases.alias.endpoint": "$networkServiceContainer.rootUri/auction".toString()]

@Shared
protected static final PrebidServerService defaultPbsService = pbsServiceFactory.getService([:])

def setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import org.prebid.server.functional.model.response.auction.AnalyticResult
import org.prebid.server.functional.model.response.auction.InvocationResult
import org.prebid.server.functional.service.PrebidServerService
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared

import static org.prebid.server.functional.model.ModuleName.PB_RESPONSE_CORRECTION
import static org.prebid.server.functional.model.config.Endpoint.OPENRTB2_AUCTION
Expand Down Expand Up @@ -48,7 +49,9 @@ class AbTestingModuleSpec extends ModuleBaseSpec {
private final static Map<String, String> MULTI_MODULE_CONFIG = getResponseCorrectionConfig() + getOrtb2BlockingSettings() +
['hooks.host-execution-plan': null]

@Shared
private static PrebidServerService ortbModulePbsService
@Shared
private static PrebidServerService pbsServiceWithMultipleModules

def setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import org.prebid.server.functional.model.request.auction.TraceLevel
import org.prebid.server.functional.model.response.auction.InvocationResult
import org.prebid.server.functional.service.PrebidServerService
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared

import static org.prebid.server.functional.model.ModuleName.ORTB2_BLOCKING
import static org.prebid.server.functional.model.ModuleName.PB_RICHMEDIA_FILTER
Expand Down Expand Up @@ -45,7 +46,9 @@ class GeneralModuleSpec extends ModuleBaseSpec {
getOrtb2BlockingSettings() +
['hooks.host-execution-plan': encode(ExecutionPlan.getSingleEndpointExecutionPlan(OPENRTB2_AUCTION, MODULES_STAGES))]

@Shared
private static PrebidServerService pbsServiceWithMultipleModule
@Shared
private static PrebidServerService pbsServiceWithMultipleModuleWithRequireInvoke

def setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import org.prebid.server.functional.model.response.auction.ModuleActivityName
import org.prebid.server.functional.service.PrebidServerService
import org.prebid.server.functional.tests.module.ModuleBaseSpec
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared

import static org.prebid.server.functional.model.ModuleName.ORTB2_BLOCKING
import static org.prebid.server.functional.model.ModuleName.PB_RICHMEDIA_FILTER
Expand All @@ -30,6 +31,7 @@ import static org.prebid.server.functional.model.response.auction.ErrorType.PREB

class AnalyticsTagsModuleSpec extends ModuleBaseSpec {

@Shared
private static PrebidServerService pbsServiceWithEnabledOrtb2Blocking

def setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import org.prebid.server.functional.model.response.auction.SeatBid
import org.prebid.server.functional.service.PrebidServerService
import org.prebid.server.functional.tests.module.ModuleBaseSpec
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared

import static org.prebid.server.functional.model.ModuleName.ORTB2_BLOCKING
import static org.prebid.server.functional.model.bidder.BidderName.ALIAS
Expand Down Expand Up @@ -62,6 +63,7 @@ class Ortb2BlockingSpec extends ModuleBaseSpec {
private static final Map PBS_CONFIG = getOrtb2BlockingSettings() + IX_CONFIG +
['adapter-defaults.ortb.multiformat-supported': 'false']

@Shared
private static PrebidServerService pbsServiceWithEnabledOrtb2Blocking

def setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import org.prebid.server.functional.model.request.auction.OperationState
import org.prebid.server.functional.service.PrebidServerService
import org.prebid.server.functional.tests.module.ModuleBaseSpec
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared

import static org.prebid.server.functional.model.request.auction.DistributionChannel.APP
import static org.prebid.server.functional.model.request.auction.OperationState.YES
Expand All @@ -27,6 +28,7 @@ class PbRequestCorrectionSpec extends ModuleBaseSpec {
private static final String ANDROID = "android"
private static final String IOS = "IOS"

@Shared
private static PrebidServerService pbsServiceWithRequestCorrectionModule

def setupSpec() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import org.prebid.server.functional.model.response.auction.Prebid
import org.prebid.server.functional.service.PrebidServerService
import org.prebid.server.functional.tests.module.ModuleBaseSpec
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared

import java.time.Instant

Expand All @@ -37,6 +38,7 @@ class ResponseCorrectionSpec extends ModuleBaseSpec {
"adapters.generic.modifying-vast-xml-allowed": "false"] +
getResponseCorrectionConfig()

@Shared
private static PrebidServerService pbsServiceWithResponseCorrectionModule

def setupSpec() {
Expand All @@ -47,6 +49,7 @@ class ResponseCorrectionSpec extends ModuleBaseSpec {
pbsServiceFactory.removeContainer(PBS_CONFIG)
}


def "PBS shouldn't modify response when in account correction module disabled"() {
given: "Start up time"
def start = Instant.now()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import org.prebid.server.functional.util.privacy.ConsentString
import org.prebid.server.functional.util.privacy.TcfConsent
import org.prebid.server.functional.util.privacy.gpp.GppConsent
import org.prebid.server.functional.util.privacy.gpp.UsNatV1Consent
import spock.lang.Shared

import static org.prebid.server.functional.model.bidder.BidderName.GENERIC
import static org.prebid.server.functional.model.bidder.BidderName.OPENX
Expand Down Expand Up @@ -77,9 +78,13 @@ abstract class PrivacyBaseSpec extends BaseSpec {
"gdpr.host-vendor-id" : GENERIC_VENDOR_ID as String,
"adapters.generic.ccpa-enforced" : "true"]

@Shared
protected static final int PURPOSES_ONLY_GVL_VERSION = PBSUtils.getRandomNumber(0, 4095)
@Shared
protected static final int LEG_INT_PURPOSES_ONLY_GVL_VERSION = PBSUtils.getRandomNumberWithExclusion(PURPOSES_ONLY_GVL_VERSION, 0, 4095)
@Shared
protected static final int LEG_INT_AND_FLEXIBLE_PURPOSES_GVL_VERSION = PBSUtils.getRandomNumberWithExclusion([PURPOSES_ONLY_GVL_VERSION, LEG_INT_PURPOSES_ONLY_GVL_VERSION], 0, 4095)
@Shared
protected static final int PURPOSES_AND_LEG_INT_PURPOSES_GVL_VERSION = PBSUtils.getRandomNumberWithExclusion([PURPOSES_ONLY_GVL_VERSION, LEG_INT_PURPOSES_ONLY_GVL_VERSION, LEG_INT_AND_FLEXIBLE_PURPOSES_GVL_VERSION], 0, 4095)

protected static final int EXPONENTIAL_BACKOFF_MAX_DELAY = 1
Expand All @@ -104,7 +109,10 @@ abstract class PrivacyBaseSpec extends BaseSpec {
protected static final Map<String, String> GENERAL_PRIVACY_CONFIG =
GENERIC_CONFIG + GDPR_VENDOR_LIST_CONFIG + GENERIC_VENDOR_CONFIG + RETRY_POLICY_EXPONENTIAL_CONFIG

@Shared
protected static PrebidServerService privacyPbsService

@Shared
protected static PrebidServerService activityPbsService

def setupSpec() {
Expand Down

0 comments on commit 34022e9

Please sign in to comment.