Bug 58601 - Change check for modifications of saveservice.properties from $Revision to sha1 sum of file
Summary: Change check for modifications of saveservice.properties from $Revision to sh...
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: All Windows CE
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-11 15:53 UTC by Felix Schumacher
Modified: 2015-11-15 13:57 UTC (History)
0 users



Attachments
Change usage of modification check to sha1 sum (5.75 KB, patch)
2015-11-11 15:53 UTC, Felix Schumacher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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