Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for premature container termination #1734

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,3 @@ class PbsServiceFactory {
}
}
}


Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import org.prebid.server.functional.testcontainers.scaffolding.pg.GeneralPlanner
import org.prebid.server.functional.testcontainers.scaffolding.pg.UserData
import org.prebid.server.functional.util.ObjectMapperWrapper
import org.prebid.server.functional.util.PBSUtils
import spock.lang.Shared
import spock.lang.Specification

@PBSTest
Expand All @@ -29,9 +30,11 @@ abstract class BasePgSpec extends Specification {
protected static final UserData userData = new UserData(Dependencies.networkServiceContainer, mapper)

protected static final PbsPgConfig pgConfig = new PbsPgConfig(Dependencies.networkServiceContainer)
protected static final PrebidServerService pgPbsService = pbsServiceFactory.getService(pgConfig.properties)
protected static final Bidder bidder = new Bidder(Dependencies.networkServiceContainer, mapper)

@Shared
protected final PrebidServerService pgPbsService = pbsServiceFactory.getService(pgConfig.properties)

def setupSpec() {
generalPlanner.setResponse()

Expand All @@ -49,7 +52,7 @@ abstract class BasePgSpec extends Specification {
pgPbsService.sendForceDealsUpdateRequest(ForceDealsUpdateRequest.sendReportRequest)
}

protected static void updateLineItemsAndWait() {
protected void updateLineItemsAndWait() {
def initialPlansRequestCount = generalPlanner.recordedPlansRequestCount
pgPbsService.sendForceDealsUpdateRequest(ForceDealsUpdateRequest.updateLineItemsRequest)
PBSUtils.waitUntil { generalPlanner.recordedPlansRequestCount == initialPlansRequestCount + 1 }
Expand Down