Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JettyTests etopo mtime (get from test file) #213

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and test ERDDAP

on:
push:
branches: [ "main", "gha-test" ]
branches: [ "main" ]
pull_request:
branches: [ "main" ]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import tags.TagAWS;
import tags.TagExternalOther;
import tags.TagLargeFiles;
import tags.TagMissingDataset;
import tags.TagMissingFile;
import tags.TagSlowTests;
import tags.TagThredds;
Expand Down Expand Up @@ -979,6 +980,7 @@ void testHyraxMUR() throws Throwable {
/** This tests GPCP. */
@org.junit.jupiter.api.Test
@TagSlowTests
@TagMissingDataset // Data temporarily unavailable at NCEI due to Hurricane Helene impacts
void testGpcp() throws Throwable {
String2.log("\n*** FileVisitorDNLS.testGpcp()\n");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static void initAll() throws Throwable {
context.setDatasetIDSet(new HashSet<>());
context.setDuplicateDatasetIDs(new StringArray());
context.setWarningsFromLoadDatasets(new StringBuilder());
context.setDatasetsThatFailedToLoadSB(new StringBuilder());
context.settUserHashMap(new HashMap<String, Object[]>());
context.setMajorLoad(false);
context.setErddap(new Erddap());
Expand Down
9 changes: 8 additions & 1 deletion src/test/java/jetty/JettyTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -14378,12 +14378,18 @@ void testEtopoGridFiles(String tDatasetID) throws Throwable {
String dapQuery, tName, start, query, results, expected;
int po;

String etopoFilePath = EDStatic.getWebInfParentDirectory() + "WEB-INF/ref/etopo1_ice_g_i2.bin";
long etopoLastModifiedMillis = File2.getLastModified(etopoFilePath);

// get /files/datasetID/.csv
results =
SSR.getUrlResponseStringNewline(
"http://localhost:" + PORT + "/erddap/files/" + tDatasetID + "/.csv");
expected =
"Name,Last modified,Size,Description\n" + "etopo1_ice_g_i2.bin,1642733858000,466624802,\n";
"Name,Last modified,Size,Description\n"
+ "etopo1_ice_g_i2.bin,"
+ etopoLastModifiedMillis
+ ",466624802,\n";
Test.ensureEqual(results, expected, "results=\n" + results);

// get /files/datasetID/
Expand Down Expand Up @@ -17535,6 +17541,7 @@ void parserAllDatasetsTest() throws Throwable {
context.setDatasetsThatFailedToLoadSB(new StringBuilder());
context.setFailedDatasetsWithErrorsSB(new StringBuilder());
context.setWarningsFromLoadDatasets(new StringBuilder());
context.setDatasetsThatFailedToLoadSB(new StringBuilder());
context.settUserHashMap(new HashMap<String, Object[]>());
context.setMajorLoad(false);
context.setErddap(new Erddap());
Expand Down
Loading