-
Notifications
You must be signed in to change notification settings - Fork 0
Batch email test for identity map #104
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,9 @@ | |
| import org.junit.jupiter.params.ParameterizedTest; | ||
| import org.junit.jupiter.params.provider.MethodSource; | ||
|
|
||
| import java.time.Duration; | ||
| import java.util.List; | ||
|
|
||
| import static org.assertj.core.api.Assertions.assertThat; | ||
| import static org.junit.jupiter.api.Assertions.*; | ||
|
|
||
|
|
@@ -105,6 +108,28 @@ public void testV2IdentityMap(String label, Operator operator, String operatorNa | |
| assertThat(response.at("/status").asText()).isEqualTo("success"); | ||
| } | ||
|
|
||
| @ParameterizedTest(name = "/v2/identity/map - {0} - {2}") | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to be clear, did we only want to test v2 identity map here and not v3?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want both, but we don't have Identity Map V3 SDK yet. It's not merged, and the tests go via the SDK. I'll add the v3 test when we have the SDK merged. |
||
| @MethodSource({ | ||
| "suite.operator.TestData#identityMapBigBatchArgs" | ||
| }) | ||
| public void testV2IdentityMapLargeBatch(String label, Operator operator, String operatorName, String payload, List<String> diis) { | ||
| assertTimeoutPreemptively(Duration.ofSeconds(5), () -> { // Validate we didn't make mapping too slow. | ||
| JsonNode response = operator.v2IdentityMap(payload); | ||
|
|
||
| assertThat(response.at("/status").asText()).isEqualTo("success"); | ||
|
|
||
| var mapped = response.at("/body/mapped"); | ||
| assertThat(mapped.size()).isEqualTo(10_000); | ||
|
|
||
| for (int i = 0; i < 10_000; i++) { | ||
| assertThat(mapped.get(i).get("identifier").asText()).isEqualTo(diis.get(i)); | ||
| assertThat(mapped.get(i).get("advertising_id").asText()).isNotNull().isNotEmpty(); | ||
| assertThat(mapped.get(i).get("bucket_id").asText()).isNotNull().isNotEmpty(); | ||
| } | ||
| }); | ||
| } | ||
|
|
||
|
|
||
| @ParameterizedTest(name = "/v2/identity/map - VALIDATE EMAIL - {0} - {2}") | ||
| @MethodSource({ | ||
| "suite.operator.TestData#tokenValidateEmailArgs", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this result in an invalid mapping or would it return some UID2 in the response?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be some UID2. We don't check, and cannot possibly check, whether the hash maps back to any valid DII. From our perspective, it's just a certain amount of bytes.