Refactor update snapshot view servlet into a Daggerized Action

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=120224051
This commit is contained in:
mcilwain 2016-04-19 06:47:25 -07:00 committed by Justine Tunney
parent 4fbf613955
commit c5d09227c5
8 changed files with 68 additions and 121 deletions

View file

@ -231,20 +231,20 @@ public class LoadSnapshotServletTest {
new JobReference()
.setProjectId("Project-Id")
.setJobId("load-snapshot-id12345-one-1391096117045"),
UpdateSnapshotViewServlet.createViewUpdateTask("testdataset", "id12345_one", "one"),
QueueFactory.getQueue(UpdateSnapshotViewServlet.QUEUE));
UpdateSnapshotViewAction.createViewUpdateTask("testdataset", "id12345_one", "one"),
QueueFactory.getQueue(UpdateSnapshotViewAction.QUEUE));
verify(bigqueryPollEnqueuer).enqueuePollTask(
new JobReference()
.setProjectId("Project-Id")
.setJobId("load-snapshot-id12345-two-1391096117045"),
UpdateSnapshotViewServlet.createViewUpdateTask("testdataset", "id12345_two", "two"),
QueueFactory.getQueue(UpdateSnapshotViewServlet.QUEUE));
UpdateSnapshotViewAction.createViewUpdateTask("testdataset", "id12345_two", "two"),
QueueFactory.getQueue(UpdateSnapshotViewAction.QUEUE));
verify(bigqueryPollEnqueuer).enqueuePollTask(
new JobReference()
.setProjectId("Project-Id")
.setJobId("load-snapshot-id12345-three-1391096117045"),
UpdateSnapshotViewServlet.createViewUpdateTask("testdataset", "id12345_three", "three"),
QueueFactory.getQueue(UpdateSnapshotViewServlet.QUEUE));
UpdateSnapshotViewAction.createViewUpdateTask("testdataset", "id12345_three", "three"),
QueueFactory.getQueue(UpdateSnapshotViewAction.QUEUE));
verify(rsp).setStatus(SC_OK);
}