Bug 58601

Summary: Change check for modifications of saveservice.properties from $Revision to sha1 sum of file
Product: JMeter Reporter: Felix Schumacher <felix.schumacher>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: P2    
Version: 2.13   
Target Milestone: ---   
Hardware: All   
OS: Windows CE   
Attachments: Change usage of modification check to sha1 sum

Description Felix Schumacher 2015-11-11 15:53:17 UTC
Created attachment 33271 [details]
Change usage of modification check to sha1 sum

Currently SaveService checks the integrity of saveservice.properties by reading $Revision, which is a svn feature. When tests are done in a git repo, the tests will fail.

This can be mitigated, by computing a sha1 checksum of saveservice.properties and use that for comparison with an expected value stored in SaveService.
Comment 1 Felix Schumacher 2015-11-14 13:51:21 UTC
Date: Sat Nov 14 13:48:09 2015
New Revision: 1714325

URL: http://svn.apache.org/viewvc?rev=1714325&view=rev
Log:
Change check for modifications of saveservice.properties from $Revision to sha1 sum of file.

Bugzilla Id: 58601

Modified:
    jmeter/trunk/bin/saveservice.properties
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java
    jmeter/trunk/xdocs/changes.xml
Comment 2 Sebb 2015-11-14 16:04:17 UTC
I think there is a problem with the checksum calculation.

The saveservice.properties file has native eol, so will be different on different OSes.

It should be possible to fix this by reading lines rather than bytes.
Comment 3 Felix Schumacher 2015-11-15 13:57:56 UTC
Date: Sun Nov 15 13:57:19 2015
New Revision: 1714452

URL: http://svn.apache.org/viewvc?rev=1714452&view=rev
Log:
Ignore newline character when computing the sha1 sum of saveservice.properties.

Followup to r1714325, since sebb pointed out, that the file could have different
line endings when checked out on different OSes.

Bugzilla Id: 58601

Modified:
    jmeter/trunk/bin/saveservice.properties
    jmeter/trunk/src/core/org/apache/jmeter/save/SaveService.java