File tree 3 files changed +11
-5
lines changed
java/software/amazon/lambda/powertools/sqs 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 45
45
<groupId >software.amazon.lambda</groupId >
46
46
<artifactId >powertools-core</artifactId >
47
47
</dependency >
48
+ <dependency >
49
+ <groupId >com.amazonaws</groupId >
50
+ <artifactId >aws-lambda-java-tests</artifactId >
51
+ </dependency >
48
52
<dependency >
49
53
<groupId >com.amazonaws</groupId >
50
54
<artifactId >aws-lambda-java-core</artifactId >
Original file line number Diff line number Diff line change 1
1
package software .amazon .lambda .powertools .sqs ;
2
2
3
3
import com .amazonaws .services .lambda .runtime .events .SQSEvent ;
4
+ import com .amazonaws .services .lambda .runtime .tests .EventLoader ;
4
5
import com .fasterxml .jackson .databind .ObjectMapper ;
5
6
import org .junit .jupiter .api .AfterEach ;
6
7
import org .junit .jupiter .api .BeforeEach ;
@@ -37,7 +38,8 @@ public class SqsUtilsFifoBatchProcessorTest {
37
38
private ArgumentCaptor <DeleteMessageBatchRequest > deleteMessageBatchCaptor ;
38
39
39
40
public SqsUtilsFifoBatchProcessorTest () throws IOException {
40
- sqsBatchEvent = MAPPER .readValue (SqsUtilsFifoBatchProcessorTest .class .getResource ("/SqsFifoBatchEvent.json" ), SQSEvent .class );
41
+ //sqsBatchEvent = MAPPER.readValue(SqsUtilsFifoBatchProcessorTest.class.getResource("/SqsFifoBatchEvent.json"), SQSEvent.class);
42
+ sqsBatchEvent = EventLoader .loadSQSEvent ("SqsFifoBatchEvent.json" );
41
43
}
42
44
43
45
@ BeforeEach
Original file line number Diff line number Diff line change 1
1
{
2
- "records " : [
2
+ "Records " : [
3
3
{
4
4
"messageId" : " 059f36b4-87a3-44ab-83d2-661975830a7d" ,
5
5
"receiptHandle" : " AQEBwJnKyrHigUMZj6rYigCgxlaS3SLy0a..." ,
14
14
"messageAttributes" : {},
15
15
"md5OfBody" : " e4e68fb7bd0e697a0ae8f1bb342846b3" ,
16
16
"eventSource" : " aws:sqs" ,
17
- "eventSourceArn " : " arn:aws:sqs:us-east-1:906126917321:sqs-lambda-MySqsQueue-4DYWWJIE97N5" ,
17
+ "eventSourceARN " : " arn:aws:sqs:us-east-1:906126917321:sqs-lambda-MySqsQueue-4DYWWJIE97N5" ,
18
18
"awsRegion" : " us-east-2"
19
19
},
20
20
{
44
44
},
45
45
"md5OfBody" : " e4e68fb7bd0e697a0ae8f1bb342846b3" ,
46
46
"eventSource" : " aws:sqs" ,
47
- "eventSourceArn " : " arn:aws:sqs:us-east-1:906126917321:sqs-lambda-MySqsQueue-4DYWWJIE97N5" ,
47
+ "eventSourceARN " : " arn:aws:sqs:us-east-1:906126917321:sqs-lambda-MySqsQueue-4DYWWJIE97N5" ,
48
48
"awsRegion" : " us-east-2"
49
49
},
50
50
{
66
66
},
67
67
"md5OfBody" : " e4e68fb7bd0e697a0ae8f1bb342846b3" ,
68
68
"eventSource" : " aws:sqs" ,
69
- "eventSourceArn " : " arn:aws:sqs:us-east-1:906126917321:sqs-lambda-MySqsQueue-4DYWWJIE97N5" ,
69
+ "eventSourceARN " : " arn:aws:sqs:us-east-1:906126917321:sqs-lambda-MySqsQueue-4DYWWJIE97N5" ,
70
70
"awsRegion" : " us-east-2"
71
71
}
72
72
]
You can’t perform that action at this time.
0 commit comments