Skip to content

Commit

Permalink
Update opt out status test
Browse files Browse the repository at this point in the history
  • Loading branch information
asloobq committed May 15, 2024
1 parent 5632fe4 commit f184510
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/java/com/uid2/operator/UIDOperatorVerticleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ public class UIDOperatorVerticleTest {
private static final String clientSideTokenGeneratePrivateKey = "UID2-Y-L-MEECAQAwEwYHKoZIzj0CAQYIKoZIzj0DAQcEJzAlAgEBBCBop1Dw/IwDcstgicr/3tDoyR3OIpgAWgw8mD6oTO+1ug==";
private static final int clientSideTokenGenerateSiteId = 123;

private static final int optOutStatusMaxRequestSize = 1000;

private AutoCloseable mocks;
@Mock private ISiteStore siteProvider;
@Mock private IClientKeyProvider clientKeyProvider;
Expand Down Expand Up @@ -159,6 +161,7 @@ private void setupConfig(JsonObject config) {

config.put(Const.Config.AllowClockSkewSecondsProp, 3600);
config.put(Const.Config.OptOutStatusApiEnabled, true);
config.put(Const.Config.OptOutStatusMaxRequestSize, optOutStatusMaxRequestSize);
}

private static byte[] makeAesKey(String prefix) {
Expand Down Expand Up @@ -2168,10 +2171,9 @@ void optOutStatusRequest(Map<String, Long> optedOutIds, int optedOutCount, Role

private static Stream<Arguments> optOutStatusValidationErrorData() {
// Test case 1
int requestLimit = 1000;
JsonArray rawUIDs = new JsonArray();

for (int i = 0; i <= requestLimit; ++i) {
for (int i = 0; i <= optOutStatusMaxRequestSize; ++i) {
byte[] rawUid2Bytes = Random.getBytes(32);
rawUIDs.add(Utils.toBase64String(rawUid2Bytes));
}
Expand Down

0 comments on commit f184510

Please sign in to comment.