This is an automated email from the ASF dual-hosted git repository. sebb pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-net.git
The following commit(s) were added to refs/heads/master by this push: new fe90f032 NET710 tests fe90f032 is described below commit fe90f032315211659917b752e8ea196baa8a0b16 Author: Sebb <s...@apache.org> AuthorDate: Tue May 7 00:24:02 2024 +0100 NET710 tests --- .github/workflows/maven_adhoc.yml | 53 +++++++++++++++++++++++++++++++-------- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/.github/workflows/maven_adhoc.yml b/.github/workflows/maven_adhoc.yml index f8aa3383..4d54a09e 100644 --- a/.github/workflows/maven_adhoc.yml +++ b/.github/workflows/maven_adhoc.yml @@ -23,7 +23,7 @@ permissions: jobs: build: timeout-minutes: 7 - runs-on: windows-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4 with: @@ -33,17 +33,48 @@ jobs: with: distribution: 'temurin' java-version: 8 - - name: Look for deletefile failures + - name: Test NET710 run: | - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest - mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + cat <<'EOD' >src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampNET710Test.java + package org.apache.commons.net.ftp.parser; + + + import java.text.ParseException; + import java.util.Calendar; + import java.util.Locale; + import java.util.TimeZone; + + import org.junit.jupiter.api.Test; + + /** + * Test NET710 + */ + public class FTPTimestampNET710Test { + + @Test + public void testNet710() throws ParseException { + Calendar serverTime = Calendar.getInstance(TimeZone.getTimeZone("EDT"), Locale.US); + serverTime.set(2022, 2, 16, 14, 0); + Calendar p = new FTPTimestampParserImpl().parseTimestamp("Mar 13 02:33", serverTime); + System.out.println(p); + } + + } + EOD + mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=FTPTimestampNET710Test + git co rel/commons-net-3.8.0 + mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=FTPTimestampNET710Test + # - name: Look for deletefile failures + # run: | + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest + # mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest # - name: Test exec function # run: | # mvn -q exec:java