Skip to content

Commit

Permalink
feat: dr parameter for backend mode direct requests
Browse files Browse the repository at this point in the history
  • Loading branch information
arifBurakDemiray committed Dec 18, 2023
1 parent ccd18fa commit 6655ed2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ void recordDirectRequestInternal(String deviceID, Map<String, String> requestDat

Request request = new Request();
request.params.add("device_id", deviceID);
request.params.add("dr", "1");
addTimeInfoIntoRequest(request, timestamp);

//remove checksum, will add before sending request to server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,7 @@ public void testRecordDirectRequest() {
Request request = SDKCore.instance.requestQueueMemory.remove();
Assert.assertEquals("value1", request.params.get("data1"));
Assert.assertEquals("value3", request.params.get("data3"));
Assert.assertEquals("1", request.params.get("dr"));
validateRequestTimeFields("device-id-2", 1647938191782L, request);

// Direct request without timestamp and device id
Expand All @@ -873,6 +874,8 @@ public void testRecordDirectRequest() {
request = SDKCore.instance.requestQueueMemory.remove();
Assert.assertEquals("value2", request.params.get("data2"));
Assert.assertEquals("value4", request.params.get("data4"));
Assert.assertEquals("1", request.params.get("dr"));

validateRequestTimeFields("device-id-2", 987654321L, request);
}

Expand Down

0 comments on commit 6655ed2

Please sign in to comment.