jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 60822] New: ResultCollector does not ensure unique file name entries in files HashMap
Date Sun, 05 Mar 2017 19:52:10 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=60822

            Bug ID: 60822
           Summary: ResultCollector does not ensure unique file name
                    entries in files HashMap
           Product: JMeter
           Version: 3.1
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: sebb@apache.org
  Target Milestone: ---

ResultCollector tries to ensure that multiple references to the same file in a
Test Plan only generate a single Writer.

However, it does not canonicalise the file names, so the same physical file may
be written by two Writers.

For example, test.jtl and ./test.jtl will result in separate entries in the
files HashMap. This could be fixed by using File.getCanonicalPath()

Also test.jtl and Test.jtl currently generate separate entries even on
case-insensitive file systems. 

There does not seem to be a way to detect file system case-sensitivity in Java.

Path.toRealPath() produces unique names for case-insenstive systems but only
works for existing files, so would require the file to be exist first. That
might be acceptable here, because the purpose of the ResultCollector is to
write the file. File.toCanonicalPath() does not take account of case
sensitivity.

It looks as though File.getCanonicalPath() returns the file name with its
actual case if the file exists.

Note that case-sensitivity is a property of the file system, not the OS, so the
same host could potentially have multiple file systems with different
case-sensitivity

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message