frankframework: Many unit tests related to file systems fail on Martijn-s laptop

❗ please do not add sensitive information in issues, you can provide extra information via email using issue number as reference ❗

Describe the issue On Martijn-s laptop, mvn clean install produces many failing unit tests, one of them being Samba2FileSystemTest>BasicFileSystemTest.basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot. This issue does not appear on Tim’s development, not in GitHub actions and not on Jenkins. The issue appears both on the master branch (commit 7e3fe213d47cb39de27709838ad4a7005474f6f9) and the 7.9-release branch (commit fbf05022202ec0b045302ef1706629f00ebc5dd6).

Martijn could reproduce the issue in Eclipse image

He added some additional logging to the test as shown below:

image

The log output is:

10:58:11,784 INFO  Samba2FileSystemTest.setUp():42[] Test in Samba2FileSystemTest [org.frankframework.filesystem.smb.Samba2FileSystemTest.null]
*** JFileServer Enterprise edition licenced to Frank!Framework (Niels Meijer/niels@frankframework.org/3)
***  For version 1.*
10:58:11,908 INFO  BasicFileSystemTest.setUp():42[] Test in BasicFileSystemTest [org.frankframework.filesystem.smb.Samba2FileSystemTest.null]
10:58:11,908 INFO  BasicFileSystemTest.basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot():482[] Test basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot
10:58:11,908 INFO  BasicFileSystemTest.basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot():483[] Clean root folder
10:58:11,908 INFO  BasicFileSystemTest.basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot():485[] Create folder 'folder'
10:58:11,909 INFO  BasicFileSystemTest.basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot():487[] Create folder 'Otherfolder'
10:58:11,909 INFO  BasicFileSystemTest.basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot():489[] Create file
10:58:11,910 INFO  BasicFileSystemTest.basicFileSystemTestListFileShouldNotReadFromOtherFoldersWhenReadingFromRoot():491[] List file

The line 10:58:11,908 INFO BasicFileSystemTest.setUp():42[] Test in BasicFileSystemTest [org.frankframework.filesystem.smb.Samba2FileSystemTest.null] comes from added code in BasicFileSystemTest.java:

image

This rule is applied in the setUp() methods to display the name of the test, although the name is rendered incorrectly as null.

When Martijn discussed with Tim van der Leeuw, it struck Jim that the createFile() calls in the test succeeded while the basicFileSystemTestListFile() call failed.

The test succeeded when it was run in Eclipse without running other tests. The information given here was produced by running all tests of package org.frankframework.filesystem.smb.

Reporter Martijn Dirkse

To Reproduce Steps to reproduce the behavior:

  1. Go to ‘…’
  2. Click on ‘…’
  3. Scroll down to ‘…’
  4. See error

Screenshots If applicable, add screenshots to help explain your problem.

Configuration

Please provide the configuration of the Pipe or Receiver with the problem.

Input

Please provide an example of the input message. 
Alternatively, provide a Ladybug report.

Environment

Please go to the console of your Frank, click on 'Information' and copy-paste the results here. 

Additional Environment

  • DBMS: [e.g. Oracle, MSSQL, MariaDB, MySql, PostgreSQL]
  • Browser: [e.g. Chrome, Safari, Edge, Firefox]

Additional Context Add any other context about the problem here. (f.e. ladybug report / test adapter with larva test)

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 26 (26 by maintainers)

Most upvoted comments

Gelukt, de testen slagen als ik met Java 17 bouw. Ik heb met deze commit getest:

commit bb172e86db48ab54629e104f7e42807343574a01 (HEAD -> master, origin/master, origin/HEAD)
Author: MarkvdVorst <34445874+MarkvdVorst@users.noreply.github.com>
Date:   Wed Mar 13 17:39:45 2024 +0100

    Remove unnecessary information from GrayBox view (#6371)

The sftp server should automatically find an unused port. @jkosternl your solution by doing exactly the same won’t fix this. I’ve personally never seen this fail on GH by the way…

Some evidence: https://github.com/frankframework/frankframework/actions/runs/8251487224/job/22568642354

My solution just tries a few ports, in order to pass through a free one to the SFTP server. This increases the chances that it works.