Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Nov 18, 2024
1 parent a0b8bda commit dd3c700
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/test/java/ru/r2cloud/it/SatelliteLoadTest.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
package ru.r2cloud.it;

import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.FileTime;
import java.util.concurrent.TimeUnit;

import org.junit.Test;

import ru.r2cloud.TestUtil;
Expand All @@ -14,8 +9,6 @@ public class SatelliteLoadTest extends RegisteredTest {

@Test
public void testLoad() throws Exception {
Path p = config.getPathFromProperty("satellites.meta.location");
Files.setLastModifiedTime(p, FileTime.from(1719525695573L, TimeUnit.MILLISECONDS));
TestUtil.assertJson("expected/satellite.json", client.getSatellite("25338"));
}

Expand Down
6 changes: 6 additions & 0 deletions src/test/java/ru/r2cloud/it/util/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
import java.net.InetSocketAddress;
import java.net.http.HttpResponse;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.attribute.FileTime;
import java.util.Properties;
import java.util.Random;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.logging.LogManager;

import org.junit.After;
Expand Down Expand Up @@ -172,6 +176,8 @@ protected Configuration prepareConfiguration() throws IOException {
w.append("ittests");
}
config.setProperty("server.keyword.location", setupKeyword.getAbsolutePath());
Path p = config.getPathFromProperty("satellites.meta.location");
Files.setLastModifiedTime(p, FileTime.from(1719525695573L, TimeUnit.MILLISECONDS));
return config;
}

Expand Down

0 comments on commit dd3c700

Please sign in to comment.