diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-12-21 21:29:15 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-12-21 21:29:15 +0000 |
commit | b5909bea2f2ad209aff5e4c18ee42c9fca48d982 (patch) | |
tree | 41f3e135b9d6bc51cb848251605a9e03a3f7ddc5 /src/main/java/com/android/vts/api | |
parent | 31063431db0e84611c19f116a132eee9478ab9b5 (diff) | |
parent | 23a7cd3e808d8f950c0d7067f66f20a747c5427a (diff) | |
download | dashboard-b5909bea2f2ad209aff5e4c18ee42c9fca48d982.tar.gz |
Merge "Fix a bug to upload a big entity exceeding 1MB."android-o-mr1-iot-release-1.0.8
Diffstat (limited to 'src/main/java/com/android/vts/api')
-rw-r--r-- | src/main/java/com/android/vts/api/DatastoreRestServlet.java | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/main/java/com/android/vts/api/DatastoreRestServlet.java b/src/main/java/com/android/vts/api/DatastoreRestServlet.java index fb5ac65..fa0ae65 100644 --- a/src/main/java/com/android/vts/api/DatastoreRestServlet.java +++ b/src/main/java/com/android/vts/api/DatastoreRestServlet.java @@ -379,15 +379,13 @@ public class DatastoreRestServlet extends BaseApiServlet { List listEntity = (List) entity; if (listEntity.size() > 0 && listEntity.get(0) instanceof TestCaseRunEntity) { - List<TestCaseRunEntity> dashboardEntityList = - (List<TestCaseRunEntity>) entity; Map< com.googlecode.objectify.Key< TestCaseRunEntity>, TestCaseRunEntity> testCaseRunEntityMap = DashboardEntity.saveAll( - dashboardEntityList, + testCaseRunEntityList, this .MAX_ENTITY_SIZE_PER_TRANSACTION); @@ -401,11 +399,9 @@ public class DatastoreRestServlet extends BaseApiServlet { .collect(Collectors.toList()); } else if (listEntity.size() > 0 && listEntity.get(0) instanceof TestRunEntity) { - List<TestRunEntity> dashboardEntityList = - (List<TestRunEntity>) entity; - dashboardEntityList.get(0).setTestCaseIds(testCaseIds); + testRunEntityList.get(0).setTestCaseIds(testCaseIds); DashboardEntity.saveAll( - dashboardEntityList, + testRunEntityList, this.MAX_ENTITY_SIZE_PER_TRANSACTION); } else { List<DashboardEntity> dashboardEntityList = |