Browse Source

[tests] every time we touch the tests fail...

Simon Krajewski 6 years ago
parent
commit
2fbd9cb1cf
2 changed files with 3 additions and 1 deletions
  1. 2 0
      tests/server/src/Main.hx
  2. 1 1
      tests/server/src/Vfs.hx

+ 2 - 0
tests/server/src/Main.hx

@@ -227,9 +227,11 @@ class ServerTests extends HaxeServerTestCase {
 		runHaxe(args);
 		assertSuccess();
 		vfs.putContent("Main.hx", getTemplate("issues/Issue8738/Main2.hx"));
+		vfs.touchFile("Main.hx");
 		runHaxe(args);
 		assertErrorMessage("Cannot force inline-call to test because it is overridden");
 		vfs.putContent("Main.hx", getTemplate("issues/Issue8738/Main3.hx"));
+		vfs.touchFile("Main.hx");
 		runHaxe(args);
 		assertSuccess();
 	}

+ 1 - 1
tests/server/src/Vfs.hx

@@ -19,7 +19,7 @@ class Vfs {
 		var path = getPhysicalPath(path);
 		FileSystem.createDirectory(path.dir);
 		var file = Fs.openSync(path.dir + "/" + path.file + "." + path.ext, 'a');
-		var last = Date.fromString(Fs.fstatSync(file).mtime.format("%T"));
+		var last = Fs.fstatSync(file).mtime;
 		var notNow = last.delta(1000);
 		Fs.futimesSync(file, notNow, notNow);
 		Fs.closeSync(file);