Update ijar tests to verify time stamp.
@@ -23,9 +23,11 @@ import com.google.common.io.ByteStreams;
import com.google.devtools.build.java.bazel.BazelJavaCompiler;
import java.io.File;
import java.io.IOException;
+import java.time.Instant;
import java.util.Arrays;
import java.util.Collections;
import java.util.Enumeration;
+import java.util.GregorianCalendar;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -285,6 +287,9 @@ public class IjarTests {
Attributes attributes = manifest.getMainAttributes();
assertThat(attributes.getValue("Target-Label")).isEqualTo("//foo:foo");
assertThat(attributes.getValue("Injecting-Rule-Kind")).isEqualTo("foo_library");
+ assertThat(jf.getEntry(JarFile.MANIFEST_NAME).getLastModifiedTime().toInstant())
+ .isEqualTo(
+ Instant.ofEpochMilli(new GregorianCalendar(1980, 0, 1, 0, 0, 0).getTimeInMillis()));
}
}
}
