aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2018-01-16 14:15:09 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2018-01-16 14:23:31 -0800
commit8b0934795036154dd4d835ea30770bc0b86243a9 (patch)
tree1ca728b45ef0898299ec0562ab53887091bb5768 /src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
parent53e45318ad8da0a244639a44c1c9a1720d8c4b10 (diff)
Remove mtime field from FileStateValue.
We stopped treating empty files specially in the execution phase after unknown commit. So this code is mostly if not entirely orphaned. The only scenario in which this would lead to a semantic difference that I can think of is if the user is running with --nouse_action_cache and a running Bazel server, and they have an action they want to re-run when an empty input file changes, which isn't something we need to be concerned about. PiperOrigin-RevId: 182109952
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java b/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
index 052b59105a..0a0b460cd4 100644
--- a/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
+++ b/src/test/java/com/google/devtools/build/lib/skyframe/FileFunctionTest.java
@@ -452,8 +452,6 @@ public class FileFunctionTest {
p.setLastModifiedTime(0L);
FileValue a = valueForPath(p);
p.setLastModifiedTime(1L);
- assertThat(valueForPath(p)).isNotEqualTo(a);
- p.setLastModifiedTime(0L);
assertThat(valueForPath(p)).isEqualTo(a);
FileSystemUtils.writeContentAsLatin1(p, "content");
// Same digest, but now non-empty.
@@ -471,7 +469,7 @@ public class FileFunctionTest {
assertThat(value.getDigest()).isNull();
p.setLastModifiedTime(10L);
- assertThat(valueForPath(p)).isNotEqualTo(value);
+ assertThat(valueForPath(p)).isEqualTo(value);
p.setLastModifiedTime(0L);
assertThat(valueForPath(p)).isEqualTo(value);
@@ -499,16 +497,6 @@ public class FileFunctionTest {
}
@Test
- public void testFileModificationModTime() throws Exception {
- fastDigest = false;
- Path p = file("file");
- FileValue a = valueForPath(p);
- p.setLastModifiedTime(42);
- FileValue b = valueForPath(p);
- assertThat(a.equals(b)).isFalse();
- }
-
- @Test
public void testFileModificationDigest() throws Exception {
fastDigest = true;
Path p = file("file");