Skip to content

Commit fe90f03

Browse files
committed
NET710 tests
1 parent 8b2d2e9 commit fe90f03

File tree

1 file changed

+42
-11
lines changed

1 file changed

+42
-11
lines changed

.github/workflows/maven_adhoc.yml

Lines changed: 42 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ permissions:
2323
jobs:
2424
build:
2525
timeout-minutes: 7
26-
runs-on: windows-latest
26+
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
2929
with:
@@ -33,17 +33,48 @@ jobs:
3333
with:
3434
distribution: 'temurin'
3535
java-version: 8
36-
- name: Look for deletefile failures
36+
- name: Test NET710
3737
run: |
38-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
39-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
40-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
41-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
42-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
43-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
44-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
45-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
46-
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
38+
cat <<'EOD' >src/test/java/org/apache/commons/net/ftp/parser/FTPTimestampNET710Test.java
39+
package org.apache.commons.net.ftp.parser;
40+
41+
42+
import java.text.ParseException;
43+
import java.util.Calendar;
44+
import java.util.Locale;
45+
import java.util.TimeZone;
46+
47+
import org.junit.jupiter.api.Test;
48+
49+
/**
50+
* Test NET710
51+
*/
52+
public class FTPTimestampNET710Test {
53+
54+
@Test
55+
public void testNet710() throws ParseException {
56+
Calendar serverTime = Calendar.getInstance(TimeZone.getTimeZone("EDT"), Locale.US);
57+
serverTime.set(2022, 2, 16, 14, 0);
58+
Calendar p = new FTPTimestampParserImpl().parseTimestamp("Mar 13 02:33", serverTime);
59+
System.out.println(p);
60+
}
61+
62+
}
63+
EOD
64+
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=FTPTimestampNET710Test
65+
git co rel/commons-net-3.8.0
66+
mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=FTPTimestampNET710Test
67+
# - name: Look for deletefile failures
68+
# run: |
69+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
70+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
71+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
72+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
73+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
74+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
75+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
76+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
77+
# mvn -V --batch-mode --file pom.xml --no-transfer-progress test -Dtest=TFTPServerPathTest
4778
# - name: Test exec function
4879
# run: |
4980
# mvn -q exec:java

0 commit comments

Comments
 (0)