Preserve update_time when replicating to SQL (#1316)

* Preserve update_time when replicating to SQL

Prevent InitSqlPipeline from changing the UpdateAutoTimestamp fields in
entities.
This commit is contained in:
Weimin Yu
2021-09-13 16:55:20 -04:00
committed by GitHub
parent f31d77c570
commit 652d099e0e
3 changed files with 35 additions and 4 deletions
@@ -306,6 +306,7 @@ class InitSqlPipelineTest {
.build());
exportDir = store.export(exportRootDir.getAbsolutePath(), ALL_KINDS, ImmutableSet.of());
commitLogDir = Files.createDirectory(tmpDir.resolve("commits")).toFile();
fakeClock.advanceOneMilli();
}
}
@@ -362,6 +363,7 @@ class InitSqlPipelineTest {
.isEqualTo(expected.getAutorenewPollMessage().getOfyKey());
assertThat(actual.getDeletePollMessage().getOfyKey())
.isEqualTo(expected.getDeletePollMessage().getOfyKey());
assertThat(actual.getUpdateTimestamp()).isEqualTo(expected.getUpdateTimestamp());
// TODO(weiminyu): check gracePeriods and transferData when it is easier to do
}
}