[GitHub] jmeter issue #356: Sonar fixes

2018-08-02 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/356
  
Sorry, don't have enough time to complete this, so I will close it for now.
Thanks for merging some of the changes and I'll try to submit smaller ones 
in future :smile: 


---


[GitHub] jmeter pull request #356: Sonar fixes

2018-08-02 Thread ham1
Github user ham1 closed the pull request at:

https://github.com/apache/jmeter/pull/356


---


[GitHub] jmeter issue #365: Expanded Checkstyle to files in src and test; fixed newly...

2018-02-11 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/365
  
Thanks for committing!


---


[GitHub] jmeter pull request #374: Add a 'go to top' button that gets shown, when pag...

2018-02-01 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/374#discussion_r165516098
  
--- Diff: xdocs/stylesheets/website-style.xsl ---
@@ -143,6 +144,13 @@
 

[GitHub] jmeter pull request #372: Remove unused variable assignment.

2018-01-30 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/372

Remove unused variable assignment.

I've manually tested a save fragment which works and I can't see any 
obvious side effects in `GuiPackage.getInstance().getCurrentSubTree()`.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter remove_unused_line

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/372.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #372


commit c3c4eafc6dae9a0caf19692eaa0d84ee49f63cc4
Author: Graham Russell <graham@...>
Date:   2018-01-30T11:38:26Z

Remove unused variable assignment.




---


[GitHub] jmeter pull request #370: ConstantPoissonProcessGenerator sonar fix

2018-01-07 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/370

ConstantPoissonProcessGenerator sonar fix

Fix sonar 'bug'. It also makes it more obvious we are changing the `i` 
declared outside the `do while` instead of redeclaring another `i` for the 
`for` loop.

PS. If someone has a better name for this variable please change as the 
code isn't very easy to understand, at least for me.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter cppg_sonar_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/370.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #370


commit 9e584c4db43627e06df469b0cedd4ddee41f3594
Author: Graham Russell <graham@...>
Date:   2018-01-07T16:15:26Z

fixed sonar warning

commit 7aeb30b9d8e44d990efb589fac3b24c1907829f4
Author: Graham Russell <graham@...>
Date:   2018-01-07T16:15:37Z

formatting




---


[GitHub] jmeter issue #231: WIP: timer that produces poisson arrivals with given cons...

2017-12-26 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/231
  
Is there a better name which makes the difference between the Constant 
Throughput Timer clearer, or should that be deprecated or just replaced with 
this?


---


[GitHub] jmeter pull request #368: Csv sample reader fix

2017-12-23 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/368

Csv sample reader fix



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter CsvSampleReader_fix

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/368.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #368


commit f4e310901f8e108736ae0b27cfaebbc987761549
Author: Graham Russell <graham@...>
Date:   2017-12-23T18:09:37Z

Added extra test and fixed failure

commit 083b1ae4ccbc9382ee09b77d69a4fb50b70ea2c0
Author: Graham Russell <graham@...>
Date:   2017-12-23T18:37:43Z

Formatting and tidy




---


[GitHub] jmeter pull request #366: Set max line length to 160 (eventual target 120).

2017-12-23 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/366

 Set max line length to 160 (eventual target 120). 

## Description
Added new checkstyle rule for max line length of 160; with the view to, 
eventually, make it around 120. I will create another PR with the rest of the 
changes from #358 once this is merged as it should make merging slightly easier.

Hopefully reducing the scope and splitting this into commits that each 
change a separate thing will help merging - let me know if it's too much and I 
could split further if required.

## Motivation and Context
This PR will prevent any extra long lines and extra long anonymous inner 
classes being accidentally added.

## Checklist:
- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter max_line_length

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/366.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #366


commit c02a4e7529cea8ea043fd918073f0b60774d1729
Author: Graham Russell <graham@...>
Date:   2017-12-23T13:59:56Z

Set max line length to 160 (eventual target 120).

commit 00ab78f50374027f7506a8143fdbbfc07dbdc21c
Author: Graham Russell <graham@...>
Date:   2017-12-23T14:02:05Z

removed blank lines and superfluous comments

commit 6dd2f65d48957adc81373919fcba77c0c6355c5b
Author: Graham Russell <graham@...>
Date:   2017-12-23T14:02:24Z

formatting and spelling




---


[GitHub] jmeter pull request #365: Expanded Checkstyle to files in src and test; fixe...

2017-12-22 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/365

Expanded Checkstyle to files in src and test; fixed newly checked files

## Description
Added `test` to the files being checked.

## Motivation and Context
Felix and Philippe found some groovy files without the headers, this fixes 
Checkstyle not picking that up.

## How Has This Been Tested?
`and checkstyle`

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter increase_checkstyle_file_coverage

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/365.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #365


commit 6f2c28508b0f3b0f1873a1702d5867aaf8790e15
Author: Graham Russell <graham@...>
Date:   2017-12-20T14:50:21Z

Expanded Checkstyle to files in src and test; fixed newly checked files




---


[GitHub] jmeter pull request #364: let GUI component (dynamically) decide whether it ...

2017-12-21 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/364#discussion_r158429468
  
--- Diff: src/core/org/apache/jmeter/gui/util/MenuInfo.java ---
@@ -74,4 +75,16 @@ public String getClassName(){
 public int getSortOrder() {
 return sortOrder;
 }
+
+/**
+ * Returns whether the menu item represented by this MenuInfo object 
should be enabled
+ * @param actionCommandthe action command name for the menu item
+ * @return true when menu item should be enabled, false otherwise.
+ */
+public boolean getEnabled(String actionCommand) {
+if (ActionNames.ADD.equals(actionCommand))
--- End diff --

Please use braces. Checkstyle should pick this up.


---


[GitHub] jmeter pull request #362: Fix sonar issue in PR #355

2017-12-21 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/362

Fix sonar issue in PR #355



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter boundary_extractor_refactor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/362.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #362


commit 4b75da00150395ff0fc31707d3f20967682e58aa
Author: Graham Russell <graham@...>
Date:   2017-12-21T13:35:02Z

Fix sonar issue in PR #355




---


[GitHub] jmeter issue #358: Checkstyle: LineLength max 165, AnonInnerLength 45 and ot...

2017-12-20 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/358
  
Sorry, yeah I see how this is difficult to review. I tend to change things 
as I see them in the file I'm editing. I will revise and split it up into one 
type of change per commit, is that ok? It might be more than 10 files but 
should be easier to review.


---


[GitHub] jmeter issue #355: BoundaryExtractor refactor

2017-12-18 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/355
  
Rebased :)


---


[GitHub] jmeter pull request #360: Reordered menus. With some drive-by tidying up.

2017-12-13 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/360

Reordered menus. With some drive-by tidying up.

## Description

Added ability for MenuFactory to add separators to menus.
Some TestBeanGUI refactoring for reformatting.
New Spock test.
Refactored AbstractThreadGroupGui menu creation.
Cleaned up horrible if sequence and unneeded variables

## How Has This Been Tested?
`ant test` and manually

## Screenshots (if appropriate):


![test-plan_menu](https://user-images.githubusercontent.com/3393038/33964457-6dbbb87c-e050-11e7-816c-c409da44fcc5.png)

![thread](https://user-images.githubusercontent.com/3393038/33964458-6ddc6f4a-e050-11e7-9f49-06168c5ba20b.png)

![sampler](https://user-images.githubusercontent.com/3393038/33964456-6d943dce-e050-11e7-9e10-6b6cfe200fbc.png)

## Types of changes
- Bug fix (non-breaking change which fixes an issue)

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter menu_sort_order

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/360.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #360


commit fc7e50fd28cde7760d0bc581f3513823abb0b2f3
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-13T21:43:51Z

Reordered menus. With some drive-by tidying up.
Added ability for MenuFactory to add separators to menus.
Some TestBeanGUI refactoring for reformatting.
New Spock test.
Refactored AbstractThreadGroupGui menu creation.
Cleaned up horrible if sequence and unneeded variables




---


[GitHub] jmeter pull request #359: Added finals to fields where possible

2017-12-13 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/359

Added finals to fields where possible



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter final

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/359.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #359


commit f46d1c4d57d67a9fb137ba981fe9ef6e73d5ecaa
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-13T20:31:34Z

added final




---


[GitHub] jmeter pull request #358: Checkstyle: LineLength max 165, AnonInnerLength 45...

2017-12-12 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/358

Checkstyle: LineLength max 165, AnonInnerLength 45 and other whitespace 
checks

Also removed some unnecessary `StringBuilder`s

## How Has This Been Tested?
`ant checkstyle test`


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter more_checkstyle

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/358.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #358


commit ec91dd9b172d954f8aa6e8f145bfda7ea97b3b6b
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-12T17:12:38Z

Checkstyle: LineLength max 165, AnonInnerLength 45 and other whitespace 
checks
Also removed some unnecessary StringBuilders




---


[GitHub] jmeter pull request #357: Refactoring/formatting in preparation for alternat...

2017-12-11 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/357

Refactoring/formatting in preparation for alternate menu sorting

## Description
Refactoring/formatting in preparation for alternate menu sorting

## How Has This Been Tested?
Looking through each menu in the UI

## Checklist:
- [x] My code follows the [code style][style-guide] of this project.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter menu_refactor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/357.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #357


commit aa4d3d922953815de6a700236fd88f744edf099f
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-10T18:06:16Z

refactoring/formatting in preparation for alternate menu sorting




---


[GitHub] jmeter pull request #356: Sonar fixes

2017-12-11 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/356

Sonar fixes

## Description
* Removed `clone()` methods which just called `super.clone()`
* Reduced size/complexity of methods by breaking them into smaller ones 
and/or reducing nesting
* Replaced `size() == 0` with `isEmpty()`
* Formatting
* Removed blank or useless comments

## How Has This Been Tested?
ant test

## Screenshots (if appropriate):

## Types of changes
- Dev fix

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter sonar_fixes

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/356.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #356


commit c60508cbb417b655ce988087323bf3259a7c25c2
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-07T00:46:18Z

Sonar fixes




---


[GitHub] jmeter pull request #355: BoundaryExtractor refactor

2017-12-11 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/355

BoundaryExtractor refactor

## Description
* Refactored `BoundaryExtractor`
* Ported tests to Spock
* Added more tests
* Other code tidyup while in the vicinity

## Motivation and Context

Took the need for a minor correction too far... but hopefully the code is 
now slightly easier to understand.

## How Has This Been Tested?
unit tests and manual testing with Boundary Extractor GUI

## Screenshots (if appropriate):

## Types of changes
- Dev improvement
- Bug fix (non-breaking change which fixes an issue)

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter boundary_extractor_refactor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/355.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #355


commit f1cd0042471ee698a0f9da266bdef5eb88181e15
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-10T21:43:02Z

BoundaryExtractor refactor




---


[GitHub] jmeter pull request #354: Corrected spelling and spacing and some wording in...

2017-12-10 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/354

Corrected spelling and spacing and some wording in messages



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter messages

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/354.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #354


commit 060f658333ce14290cd1de8df951b47650933e9e
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-10T17:20:37Z

Corrected spelling and spacing and some wording




---


[GitHub] jmeter pull request #353: Re-wrote some existing tests in Spock

2017-12-08 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/353

Re-wrote some existing tests in Spock

## Description
Re-wrote some existing tests in Spock:
* ThroughputControllerSpec
* MD5HexAssertionSpec
* RandomOrderControllerSpec
* org.apache.jmeter.engine.util.PackageSpec

plus some minor code tweaks.

## How Has This Been Tested?
`ant -Djava.awt.headless=true -Drmi_force_localhost=true 
-Dskip.bug52310=true -Dskip.test_https=true checkstyle clean test`

## Screenshots (if appropriate):

## Types of changes

- Dev enhancement

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter more_spock_tests

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/353.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #353


commit e9ab76884a90c8eaafb22e1d0fdd2fbdbe5e3947
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-27T19:02:54Z

Re-wrote some existing tests in Spock:
ThroughputControllerSpec
MD5HexAssertionSpec
RandomOrderControllerSpec
org.apache.jmeter.engine.util.PackageSpec

plus some minor code tweaks




---


[GitHub] jmeter issue #350: Parallelised unit tests

2017-12-07 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/350
  
Not sure. I can reproduce on trunk but It doesn't happen on this PR for me. 
Should have time at the weekend to investigate,


---


[GitHub] jmeter issue #351: Fixed about dialog position on first view

2017-12-07 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/351
  
Can't see how this changed caused a test failure...


---


[GitHub] jmeter pull request #352: Menu bar - added mnemonics to more menu items

2017-12-07 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/352

Menu bar - added mnemonics to more menu items 

## Description
* added mnemonics to more menu items 
* general refactor/tidy of code

## Motivation and Context
To make navigation easier, e.g. now to open most recent project, Alt+F, 
Alt+E, Enter.

## How Has This Been Tested?
Manually on Linux Mint

## Screenshots (if appropriate):

## Types of changes
- Dev improvement and
- New feature (non-breaking change which adds functionality)

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter menu_bar

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/352.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #352


commit 2749067b43f7488d448641e2757ec07df90bf52b
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-07T14:05:02Z

added mnemonics to more menu items

commit eaf4f613e56b2cb2d34651a92d9d27f3305b6080
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-07T14:11:07Z

General refactor/tidyup




---


[GitHub] jmeter pull request #351: Fixed about dialog position on first view

2017-12-07 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/351

Fixed about dialog position on first view

## Description
When viewing "About JMeter" dialog it was positioned with the top corner in 
the middle rather than in the centre of the screen because the first time the 
dialog wasn't `pack()`'ed so didn't have any size.

## Types of changes
- Bug fix (non-breaking change which fixes an issue)

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter about_position

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/351.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #351


commit d685baa175189690bb691fde6ae2af2cc0d40abb
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-07T13:48:16Z

Fixed about dialog position on first view




---


[GitHub] jmeter pull request #350: Parallelised unit tests

2017-12-06 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/350

Parallelised unit tests

## Description

introduced `JMeterSerialTest` interface for tests which need to be run in 
sequence not concurrently.
Re-wrote `TestFileServer` in Spock to use private constructor to get around 
singleton and make clearer to understand.
Added a test listener to time and log to file time taken for each unit test.
Also refactored/re-formatted some code while investigating parallel test 
failures.

`ant _test` time on a 4 core laptop:
before: 1m 19s
after:  51s

on an 8 core PC:
before: 59s
after:  31s

I'd welcome more testing on different configurations and review.

## Motivation and Context

Speed up feedback

## How Has This Been Tested?

100 iterations of `ant _test` on an 8 core machine
50 iterations of `ant _test` on a 4 core machine

## Screenshots (if appropriate):

## Types of changes

- Dev improvement

## Checklist:
- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter parallelise_unit_tests

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/350.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #350


commit 8e1c2b65221bccdcf93e29da6cd1875d016685b5
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-06T17:32:55Z

Parallelised unit tests.
Introduced JMeterSerialTest interface for tests which need to be run
individually in sequence not concurrently.
Re-wrote TestFileServer in Spock to use private constructor to get around 
singleton.
Also refactored/re-formatted some code while investigating parallel test 
failures.




---


[GitHub] jmeter issue #343: Reduced the size of all screenshots.

2017-12-03 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/343
  
Deleted the wrong branch...


---


[GitHub] jmeter pull request #343: Reduced the size of all screenshots.

2017-12-03 Thread ham1
GitHub user ham1 reopened a pull request:

https://github.com/apache/jmeter/pull/343

Reduced the size of all screenshots.

## Description
Reduced size of all png screenshots using: `pngquant -f --ext .png 
--quality 70-95 *.png`.
Most were only reduced marginally but some were reduced a lot. This should 
probably be done for each new screenshot to ensure source control and the doc 
website loads as fast as possible.
Also: 
Removed workbench from a few screenshots.
Removed unused screenshots.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter doc_screenshots

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/343.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #343


commit 2ea40bc692e07778acd2c4e402bce9421cbe9985
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-03T12:47:06Z

compressed pngs with saving greater than 2k

commit b9ba0ba77078c005bc9fcae4a37382109d9b7069
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-03T13:00:09Z

Removed unused screenshots

commit 75c23e0fdf2184e8c1d88d502eea6a181447c9b3
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-03T13:01:39Z

Merge branch 'compress_png' into doc_screenshots




---


[GitHub] jmeter pull request #343: Reduced the size of all screenshots.

2017-12-03 Thread ham1
Github user ham1 closed the pull request at:

https://github.com/apache/jmeter/pull/343


---


[GitHub] jmeter issue #343: Reduced the size of all screenshots.

2017-12-03 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/343
  
I've updated the PR:
* removed an unused screenshot
* de-duped a screenshot and
* compressed all png images with an individual saving of more than 2048 
bytes using the command line and script below.

`find xdocs/ src/ test/ bin/ -iname "*.png" -print0 | xargs -0 -n 1 -P 3 
./compare-size.sh `

```bash
#!/bin/bash
set -e
err_report() {
echo "Error on line $1"
rm -v "${2}.new"
}
trap 'err_report ${LINENO} ${1}' ERR

pngquant --quality=70-100 --output "${1}.new" "${1}"

oldSize=$(stat -c%s "${1}")
newSize=$(stat -c%s "${1}.new")
let "diff = ${oldSize} - ${newSize}" || true # if sum is 0
let "threshold = ${newSize} + (1024 * 2)"

if [[ ${oldSize} -ge ${threshold} ]]
then
echo "${1} compressed, saved ${diff}"
mv "${1}.new" "${1}"
else
rm -v "${1}.new"
fi
```


---


[GitHub] jmeter issue #348: Removed LogFilter and associated uses.

2017-12-01 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/348
  
Happy for someone to show me how this is used and useful and I will close 
the PR and learn from it :)


---


[GitHub] jmeter pull request #348: Removed LogFilter and associated uses.

2017-12-01 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/348

Removed LogFilter and associated uses.

Also formatted JavaDocs in SessionFilter.

## Description
I was about to write some Spock tests for `LogFilter` but, apart from the 
file not having meaningfully changed since 2003, I can't see it being used 
anywhere online or in the code.

The docs even say:
> The LogFilter is intended to allow access log entries to be filtered by 
filename and regex, as well as allowing for the replacement of file extensions. 
However, it is not currently possible to configure this via the GUI, **so it 
cannot really be used**.

## Motivation and Context
Removing unused code or that of little value.

## How Has This Been Tested?

## Types of changes
- Cruft removal

## Checklist:
- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter remove_log_filter

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/348.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #348


commit 728fb350448dc7c87e79c75edb2cd961f49508f2
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-01T19:47:49Z

Removed LogFilter and associated uses.
Also formatted JavaDocs in SessionFilter.




---


[GitHub] jmeter pull request #346: Bug 61827 - TextFile always adds newline to end of...

2017-11-30 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/346

Bug 61827 - TextFile always adds newline to end of string

## Description
Re-wrote `getText` (and `setText` while I was there) for `TextFile` because 
`getText` always appends a newline separator at the end of the file regardless 
if the original file has one or not.

This changes the behaviour slightly and currently breaks some tests. I'm 
not sure if it's the tests' fault or the change. I've "fixed" the tests, but 
these need reviewing by someone who knows how the JMS stuff and anything else 
which uses it works and any assumptions they made.

## Motivation and Context
https://bz.apache.org/bugzilla/show_bug.cgi?id=61827
> a new line is adding to the content of the file read by a JMS publisher 
sampler.
The issue is on the getText method of the TextFile : 
=> sb.append(line + lineEnd);

## How Has This Been Tested?
Added unit tests to demo the new behaviour, previous could would have 
failed by added an extra newline to end of file which did not end in a new line.

## Screenshots (if appropriate):

## Types of changes

- Bug fix (non-breaking change which fixes an issue)
- New feature (non-breaking change which adds functionality)
- Breaking change (fix or feature that would cause existing functionality 
to not work as expected)

## Checklist:


- [ ] My code follows the [code style][style-guide] of this project.
- [ ] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter bug_61827

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/346.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #346


commit 944170a6aaf6b416e93cd1f0008460858351cd78
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-30T17:47:50Z

Re-wrote getText() method

commit d793c2e18ac32bc9cd7e5805b83750954d74218d
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-30T19:21:00Z

Fixed read and write and added tests

commit a52fec86f2b4b0ab966e478ac466c63d695494ff
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-30T19:21:58Z

PublisherSampler.java tweaks

commit 0b90d513301e6e498645e4c3d88dce62291e9f41
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-01T00:07:35Z

Updated unit tests

commit 16d01091b5655096f285977fbfa296d9d9b45bc7
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-01T00:16:53Z

Improve code

commit 8196a066769db7ced7cf32bdc4abf6a3a46c7027
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-12-01T01:39:05Z

Fix other tests




---


[GitHub] jmeter issue #345: Checkstyle

2017-11-30 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/345
  
@romani, sorry I'm not clear on what, if anything, you'd want me to 
do/change?


---


[GitHub] jmeter pull request #344: Migrate JSON Path Assertion into JMeter core

2017-11-30 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/344#discussion_r153870336
  
--- Diff: 
src/components/org/apache/jmeter/extractor/json/jsonpath/JSONPathAssertion.java 
---
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.extractor.json.jsonpath;
+
+import com.jayway.jsonpath.JsonPath;
+import net.minidev.json.JSONArray;
+import net.minidev.json.JSONObject;
+import org.apache.jmeter.assertions.Assertion;
+import org.apache.jmeter.assertions.AssertionResult;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.testelement.AbstractTestElement;
+import org.apache.jmeter.util.JMeterUtils;
+import org.apache.oro.text.regex.Pattern;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.Serializable;
+import java.text.DecimalFormat;
+import java.util.Map;
+
+/**
+ * This is main class for JSONPath Assertion which verifies assertion on
+ * previous sample result using JSON path expression
+ */
+public class JSONPathAssertion extends AbstractTestElement implements 
Serializable, Assertion {
+private static final Logger log = 
LoggerFactory.getLogger(JSONPostProcessor.class);
+private static final long serialVersionUID = 1L;
+public static final String JSONPATH = "JSON_PATH";
+public static final String EXPECTEDVALUE = "EXPECTED_VALUE";
+public static final String JSONVALIDATION = "JSONVALIDATION";
+public static final String EXPECT_NULL = "EXPECT_NULL";
+public static final String INVERT = "INVERT";
+public static final String ISREGEX = "ISREGEX";
+
+public static final DecimalFormat decimalFormatter = new 
DecimalFormat("#.#");
+
+static {
+decimalFormatter.setMaximumFractionDigits(340); // 
java.text.DecimalFormat.DOUBLE_FRACTION_DIGITS == 340
+decimalFormatter.setMinimumFractionDigits(1);
+}
+
+public String getJsonPath() {
+return getPropertyAsString(JSONPATH);
+}
+
+public void setJsonPath(String jsonPath) {
+setProperty(JSONPATH, jsonPath);
+}
+
+public String getExpectedValue() {
+return getPropertyAsString(EXPECTEDVALUE);
+}
+
+public void setExpectedValue(String expectedValue) {
+setProperty(EXPECTEDVALUE, expectedValue);
+}
+
+public void setJsonValidationBool(boolean jsonValidation) {
+setProperty(JSONVALIDATION, jsonValidation);
+}
+
+public void setExpectNull(boolean val) {
+setProperty(EXPECT_NULL, val);
+}
+
+public boolean isExpectNull() {
+return getPropertyAsBoolean(EXPECT_NULL);
+}
+
+public boolean isJsonValidationBool() {
+return getPropertyAsBoolean(JSONVALIDATION);
+}
+
+public void setInvert(boolean invert) {
+setProperty(INVERT, invert);
+}
+
+public boolean isInvert() {
+return getPropertyAsBoolean(INVERT);
+}
+
+public void setIsRegex(boolean flag) {
+setProperty(ISREGEX, flag);
+}
+
+public boolean isUseRegex() {
+return getPropertyAsBoolean(ISREGEX, true);
+}
+
+private void doAssert(String jsonString) {
+Object value = JsonPath.read(jsonString, getJsonPath());
+
+if (isJsonValidationBool()) {
+if (value instanceof JSONArray) {
+if (arrayMatched((JSONArray) value)) {
+return;
+}
+} else {
+if (isExpectNull() && value == null) {
+return;
+} else if (isEquals(value)) {
+return;
+  

[GitHub] jmeter pull request #344: Migrate JSON Path Assertion into JMeter core

2017-11-30 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/344#discussion_r154070701
  
--- Diff: test/src/org/apache/jmeter/assertions/TestJSONPathAssertion.java 
---
@@ -0,0 +1,383 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.jmeter.assertions;
+
+import org.apache.jmeter.samplers.SampleResult;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class TestJSONPathAssertion {
+
+@Test
+public void testGetJsonPath() {
+JSONPathAssertion instance = new JSONPathAssertion();
+String expResult = "";
+String result = instance.getJsonPath();
+assertEquals(expResult, result);
+}
+
+@Test
+public void testSetJsonPath() {
+String jsonPath = "";
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setJsonPath(jsonPath);
+}
+
+@Test
+public void testGetExpectedValue() {
+JSONPathAssertion instance = new JSONPathAssertion();
+String expResult = "";
+String result = instance.getExpectedValue();
+assertEquals(expResult, result);
+}
+
+@Test
+public void testSetExpectedValue() {
+String expectedValue = "";
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setExpectedValue(expectedValue);
+}
+
+@Test
+public void testSetJsonValidationBool() {
+JSONPathAssertion instance = new JSONPathAssertion();
+instance.setJsonValidationBool(false);
+}
+
+@Test
+public void testIsJsonValidationBool() {
+JSONPathAssertion instance = new JSONPathAssertion();
+boolean result = instance.isJsonValidationBool();
+assertEquals(false, result);
+}
+
+@Test
+public void testGetResult_positive() {
--- End diff --

These tests would work really well in Spock e.g.:

```groovy
def samplerResult = new SampleResult()
def sut = new JSONPathAssertion()

@Unroll
def "get #jsonPath expect #expectedValue to fail=#failure"() {
given:
samplerResult.setResponseData("{\"myval\": 123}".getBytes())
sut.setJsonPath("$.myval")
sut.setJsonValidationBool(true)
sut.setExpectedValue("123")
when:
def result = sut.getResult(samplerResult)
then:
result.getName() == new AssertionResult("").getName()
result.isFailure() == failure
where:
jsonPath  || expectedValue | failure
"$.myval" || "123" | false
"$.myval" || "(123|456)"   | false
"$.myval" || "1234"| true
}
```


---


[GitHub] jmeter issue #345: Checkstyle

2017-11-30 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/345
  
Yes, that's correct, I some how missed it in the docs.

I've suggested on https://github.com/checkstyle/checkstyle/issues/5305 that 
the error message is changed to something like:
`"Return count is 2 (maxForVoid allowed is 1). [ReturnCount10]"`
or
`"Void return count is 2 (max allowed is 1). [ReturnCount10]"`
to perhaps help prevent the confusion.


---


[GitHub] jmeter issue #345: Checkstyle

2017-11-30 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/345
  
@romani it's commented out to stop this PR failing but where you see it 
commented out was where I had:
```

  

```


---


[GitHub] jmeter pull request #345: Checkstyle

2017-11-29 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/345

Checkstyle

## Description
* Updated to latest checkstyle (v8.5)
* Added many more rules to checkstyle
* Included checking of test files and more file types

## Motivation and Context
Automatically enforcing some of the coding standards/conventions helps 
improve readability and prevents commits like "Tab police" or commits which 
only change formatting thus cluttering the history (or leaving it in an 
inconsistent state to micro-annoy subsequent readers).

## How Has This Been Tested?
`ant clean checkstyle -Djava.awt.headless=true -Dskip.bug52310=true 
-Dskip.test_https=true test`

## Screenshots (if appropriate):

## Types of changes

- Dev enhancement

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter checkstyle

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/345.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #345


commit 2211ef54083c63408c5d26a6b3efc094217a212d
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-20T23:15:30Z

Added JavaDoc check for methods

commit c522c65a56e7235d9ff08863a06f78fd46ed677c
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-23T22:25:18Z

Added checkstyle rules: AvoidStarImport, Redundant and Unused Import

commit 2c42a045f23086f28530ebc5131824c6749a3094
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-26T10:18:10Z

Updated to latest checkstyle, 8.4. Included test and properties files.
Added more rules, e.g. max file length, max 2 blank lines, no empty catch 
blocks.

commit f22813aeaa1425a145481d6d997443b783391246
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-26T19:59:09Z

Added IllegalThrows and fixed issues

commit 7833686519d94f3746918aa16d2f7bbd51002c37
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-27T21:45:45Z

WIP: MissingSwitchDefault and ModifiedControlVariable

commit 1b1cc5bde4118dda7e11d076fdef832e02fa3996
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-28T01:52:42Z

Added and fixed MultipleVariableDeclarations, NestedForDepth, NestedIfDepth 
and NestedTryDepth

commit 02d9cb7a9426c8cf6ba099caf1b7d2fbdb57f15b
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-28T02:12:43Z

Removed commented out surpression

commit 8a50df25c32158abbd854c4c49765b440129c7a3
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-28T02:18:35Z

Updated to checkstyle 8.5

commit c531cd0cf2cee82ba388f76e0b18bd402acc24d2
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-29T00:44:07Z

Added more checkstyle rules, and fixes:
OneStatementPerLine
SimplifyBooleanExpression
SimplifyBooleanReturn
StringLiteralEquality
SuperFinalize
UnnecessaryParentheses

commit 7b95f6a8e77b8dcd6e76694b93529bd4ad0edb1b
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-29T10:15:33Z

Formatted darcula_theme.xml with a 2 space indent and added NL at EOF

commit 44fc9d3b9431fdb106b2d07016db9e606f87f664
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-29T15:19:18Z

Fix mistake caught by unit tests, hurrah for unit tests.




---


[GitHub] jmeter pull request #343: Reduced the size of all screenshots.

2017-11-26 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/343

Reduced the size of all screenshots.

## Description
Reduced size of all png screenshots using: `pngquant -f --ext .png 
--quality 70-95 *.png`.
Most were only reduced marginally but some were reduced a lot. This should 
probably be done for each new screenshot to ensure source control and the doc 
website loads as fast as possible.
Also: 
Removed workbench from a few screenshots.
Removed unused screenshots.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter doc_screenshots

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/343.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #343


commit 43e81eab0c44f82efd106b3ef2a3650d5429e0c9
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-26T17:48:59Z

Reduced the size of all screenshots.
Removed workbench from a few screenshots.
Removed unused screenshots.




---


[GitHub] jmeter issue #332: Added Spock framework and some tests, both old and new

2017-11-25 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/332
  
Thank you for merging!


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153054513
  
--- Diff: src/functions/org/apache/jmeter/functions/ChangeCase.java ---
@@ -127,19 +129,14 @@ public String getReferenceKey() {
 return DESC;
 }
 
-private static String camel(String str, boolean isFirstCapitalized) {
-StringBuilder builder = new StringBuilder(str.length());
-String[] tokens = NOT_ALPHANUMERIC_REGEX.split(str);
-for (int i = 0; i < tokens.length; i++) {
-String lowerCased = StringUtils.lowerCase(tokens[i]);
-if(i == 0) {
-builder.append(isFirstCapitalized ? 
StringUtils.capitalize(lowerCased):
-lowerCased);
-} else {
-builder.append(StringUtils.capitalize(lowerCased));
-}
+private static String camel(String input, boolean uncapitalizeFirst) {
+List tokens = 
Arrays.asList(SPLIT_CHARS.split(input)).stream()
+.filter(s -> 
!s.isEmpty()).map(StringUtils::lowerCase).map(StringUtils::capitalize)
--- End diff --

I generally prefer each item on a new line - I had to read this line twice 
as I missed the map in the middle on first pass, whereas I think:
```java
.filter(StringUtils::isNotEmpty)
.map(StringUtils::lowerCase)
.map(StringUtils::capitalize)
```
is just that bit easier to read and doesn't get in the way of comprehending 
the code.


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153049075
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.functions;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.jmeter.engine.util.CompoundVariable;
+import org.apache.jmeter.functions.ChangeCase.ChangeCaseMode;
+import org.apache.jmeter.junit.JMeterTestCase;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.hamcrest.CoreMatchers;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class TestChangeCaseExamples extends JMeterTestCase {
+
+@Parameters
+public static Collection<Object[]> data() {
+return Arrays.asList(new Object[][] { { " spaces before and after 
",
+new String[] { " SPACES BEFORE AND AFTER ",
--- End diff --

I agree.

See the PR for an example in `HTTPUtilsSpec` (and smaller examples in a few 
of the other tests).


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153048260
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.functions;
+
+import static org.junit.Assert.*;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.apache.jmeter.engine.util.CompoundVariable;
+import org.apache.jmeter.functions.ChangeCase.ChangeCaseMode;
+import org.apache.jmeter.junit.JMeterTestCase;
+import org.apache.jmeter.samplers.SampleResult;
+import org.apache.jmeter.threads.JMeterContext;
+import org.apache.jmeter.threads.JMeterContextService;
+import org.apache.jmeter.threads.JMeterVariables;
+import org.hamcrest.CoreMatchers;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized;
+import org.junit.runners.Parameterized.Parameters;
+
+@RunWith(Parameterized.class)
+public class TestChangeCaseExamples extends JMeterTestCase {
+
+@Parameters
+public static Collection<Object[]> data() {
+return Arrays.asList(new Object[][] { { " spaces before and after 
",
+new String[] { " SPACES BEFORE AND AFTER ",
--- End diff --

One per line or all on one line would make this easier to read, also a 
comment regarding which mode corresponds to which position would be helpful for 
future reference (if/when it changes).


---


[GitHub] jmeter pull request #342: More edge cases for changeCase function and slight...

2017-11-25 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/342#discussion_r153048235
  
--- Diff: test/src/org/apache/jmeter/functions/TestChangeCaseExamples.java 
---
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.functions;
+
+import static org.junit.Assert.*;
--- End diff --

No `*` imports :)


---


[GitHub] jmeter issue #332: Added Spock framework and some tests, both old and new

2017-11-23 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/332
  
Great, thank you. If someone could merge #337 first then I can make there 
are no conflicts.


---


[GitHub] jmeter issue #332: Added Spock framework and some tests, both old and new

2017-11-23 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/332
  
I've added some more tests:
* `ApdexSummaryConsumer` and 
* `ListResultData`

Plus some code tidy up.

Any thoughts?


---


[GitHub] jmeter pull request #339: Refactored TestChangeCase.

2017-11-23 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/339

Refactored TestChangeCase.

Improved readability.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter casechange-test-improvment

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/339.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #339


commit 019b3d5eb20c0a930d0d80a0bc66d84566c1f9f0
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-21T11:38:53Z

Refactored TestChangeCase.




---


[GitHub] jmeter issue #332: Added Spock framework and some tests, both old and new

2017-11-22 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/332
  
I've fixed any conflicts now.

So far I've migrated and added to:
* RunTime
* HTTPUtils

I've added new tests for:
* UniformRandomTimer
* JDBCSampler  - however I can't see how to test `sample()` due to  use of 
the inner class `DataSourceComponenetImpl` inside the 
`DataSourceElement.getConnection()`
*  `Top5ErrorsBySamplerConsumer` with some refactoring
* ` Top5ErrorsBySamplerData` and found a bug and fixed it here and #337 

Codecov hasn't posted again to the PR, but the coverage is now marginally 
higher: https://codecov.io/gh/apache/jmeter/pull/332

I will try to add some more tests over the next few days if this is useful? 

Also, I don't know much about ant and the way JMeter manages dependencies, 
so please let me know if there's a better way.


---


[GitHub] jmeter pull request #337: Tidy JavaDoc and fix error in getTop5ErrorMetrics ...

2017-11-22 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/337

Tidy JavaDoc and fix error in getTop5ErrorMetrics method.

## Description
Fixed bug whereby calling `registerError` with the following data set 
`["A", "B", "C", "D", "E", "F"]` would return `[["A", 1], [null, null], [null, 
null], [null, null], [null, null]]` instead of `[["A", 1], ["B", 1], ["C", 1], 
["D", 1], ["E", 1]]`.

Improved JavaDoc for `registerError`
Also removed JavaDoc which did not add anything to the method names.

## Motivation and Context
Made the code more readable and at the same time fixed a subtle error.

## How Has This Been Tested?
On my spock branch:
```groovy
def "errors with the same frequency are preserved up until the size 
limit"() {
given:
def testData = ["A", "B", "C", "D", "E", "F"]
for (def key : testData) {
sut.registerError(key)
}
expect:
sut.getTop5ErrorsMetrics() == [["A", 1], ["B", 1], ["C", 1], 
["D", 1], ["E", 1]]
}
```

## Screenshots (if appropriate):

## Types of changes

- Bug fix (non-breaking change which fixes an issue)

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter top_5_error_bug

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/337.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #337


commit 762b0fe5919e8aa75f1d21abb3fdaf7292a8d049
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-22T18:03:14Z

Tidy JavaDoc and fix error in getTop5ErrorMetrics method.




---


[GitHub] jmeter pull request #336: Fixed some docs regarding removal of WorkBench

2017-11-21 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/336

Fixed some docs regarding removal of WorkBench

Removed some references to WorkBench from docs.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter workbench-tidy

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/336.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #336


commit 3f0ecbf5d1c1f49d17b7a9bcf6729b2e62cd5d3e
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-22T00:57:28Z

Fixed some docs regarding removal of WorkBench




---


[GitHub] jmeter pull request #335: Removed functions.util.* as they don't seem to be ...

2017-11-21 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/335

Removed functions.util.* as they don't seem to be used (for many years).

## Description
Remove files which don't seem to be used, they have a TODO comment from 
2008 and hasn't been meaningfully changed since 2003.

## How Has This Been Tested?
Ran unit tests.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter remove_unused_functions.util

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/335.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #335


commit 38a6e30435d8e56b1a51cb9c7637a90ab843d581
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-21T21:05:04Z

Removed functions.util.* as they don't seem to be used (for many years).




---


[GitHub] jmeter pull request #334: Enable running of JUnit tests from within IntelliJ...

2017-11-20 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/334

Enable running of JUnit tests from within IntelliJ with default config

## Description
With the default IntelliJ config tests are not run in the `bin` or project 
root folder which meant tests didn't run without a custom run setting.

## Motivation and Context
Makes running tests far easier in IntelliJ.

## How Has This Been Tested?
Running a sample of unit tests in IntelliJ

## Screenshots (if appropriate):

## Types of changes
- Dev enhancement
 
## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter run-test-intellij

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/334.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #334


commit 57c8c3871d9eb7158a1c06d3e81c1917dd85357d
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-21T01:56:56Z

enabled running of JUnit tests from within IntelliJ with default config




---


[GitHub] jmeter pull request #333: Added header check to checkstyle, fixed errors and...

2017-11-20 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/333

Added header check to checkstyle, fixed errors and minor cleanup

## Description
Added Java Apache licence header check, used a regex so that we don't have 
to change 100s of files and it still does the job of catching any file with a 
missing header, however it doesn't match the current format listed 
http://www.apache.org/dev/apply-license.html but it matches the majority of the 
ones in the code base at the moment.

## Motivation and Context
Prevent/notify when files are missing a header rather than rely on someone 
spotting it.

## How Has This Been Tested?
`ant checkstyle`

## Screenshots (if appropriate):

## Types of changes

- Dev enhancement

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [ ] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter checkstyle-improvements

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/333.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #333


commit 4bf9d4082832269ad737832659d4160aab767cd3
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-20T01:35:03Z

Added header check to checkstyle, fixed errors and minor cleanup




---


[GitHub] jmeter issue #332: Added Spock framework and some tests, both old and new

2017-11-19 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/332
  
Oh, failed due to tabs from isVar/PropDefined function patch.


---


[GitHub] jmeter pull request #332: Added Spock framework and some tests, both old and...

2017-11-19 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/332

Added Spock framework and some tests, both old and new

## Description
WIP for adding Spock to JMeter. Created some new tests and translated some 
old ones.

## Motivation and Context
See the Mocking Framework email thread: 
http://mail-archives.apache.org/mod_mbox/jmeter-dev/201612.mbox/%3c36ce3782-dee8-388c-9539-5bcfb8d5f...@internetallee.de%3e

## How Has This Been Tested?
By running the unit tests ;)

## Screenshots (if appropriate):

## Types of changes
- Dev enhancement

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [ ] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter spock

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/332.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #332


commit 86cd98eca1c14bd51673f5271ebed376e54e40db
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-18T17:17:42Z

Added Spock framework and some tests, both old and new




---


[GitHub] jmeter pull request #331: Removed (some more) commented out code

2017-11-18 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/331

Removed (some more) commented out code

## Description
Removing more commented out code

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter remove_commented_out_code

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/331.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #331


commit b60d1b77903d881465295d56199a93b835b305c4
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-18T09:47:23Z

Removed commented out code




---


[GitHub] jmeter issue #329: Expansion of "Add expand/collapse all menu in render XML ...

2017-11-16 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/329
  
I think this is useful for people who are exploring the xml responses.
I agree that this could be removed if the XPath tester was improved with 
the same view.


---


[GitHub] jmeter issue #324: Save backup refactor

2017-11-15 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/324
  
@pmouawad Thank you for committing my changes - in future I'm happy to 
rebase and fix merge issues so you don't have to :)

There were only a few minor things:
- formatting of streams api code - they seem to be mostly on one line, 
whereas I think they read much better when split, (perhaps this is the eclipse 
formatter?)
- some extra whitespace was added (maybe eclipse settings?)
- I question the JavaDoc on the private methods - it didn't seem to help, I 
had hoped the method name was sufficient - is there a reason it was added?
- formatting of JavaDoc comments, I think we should agree on a format and 
make sure it's updated in the style guide on the wiki as we currently have a 
mix and it would be good to agree to prevent further inconsistency (the 
location of the description of the param, same or new line)

What's the best way for me to provide these changes? Force push to this PR, 
new PR, email patch file?

Thanks


---


[GitHub] jmeter pull request #329: Expansion of "Add expand/collapse all menu in rend...

2017-11-14 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/329

Expansion of "Add expand/collapse all menu in render XML view" (PR #294)

## Description

Update and expansion to PR #294. I hope @max3163 doesn't mind. It improves 
upon the UX of the original (good) idea by having the right click also select 
the node, rather than right click bring up the menu but not changing the 
selected node which felt counter intuitive.

## Motivation and Context

Makes exploring the XML results far easier, especially for large documents.

## How Has This Been Tested?

Manually downloading a few different xml docs and right clicking, expanding 
and collapsing in various places.

## Screenshots (if appropriate):
Right clicking on the element, selects it and brings up the menu:
![Right-click on 
element](https://user-images.githubusercontent.com/3393038/32809390-93ddce74-c98e-11e7-98a0-ba6db1814109.png)
Expands all:
![Expand 
All](https://user-images.githubusercontent.com/3393038/32809399-99c05500-c98e-11e7-83e9-a334aedd692b.png)

## Types of changes
- New feature (non-breaking change which adds functionality)

## Checklist:
- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter pr_294

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/329.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #329


commit f3819f9e94e6e9890f0483f645f214137867e547
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-14T22:29:38Z

formatting

commit afb038ae7341f6448c1573c073d5f140371c1e82
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-14T22:31:10Z

Right click XML view will select node and show menu for collapse/expand.

commit 094716219c6a22bebf16048946b291d9dbab467e
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-14T23:03:55Z

Updated docs




---


[GitHub] jmeter pull request #320: HTTPClient 4.5. migration to last APIs / Bugzilla ...

2017-11-14 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/320#discussion_r150891448
  
--- Diff: 
src/protocol/http/org/apache/jmeter/protocol/http/api/auth/DigestParameters.java
 ---
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * 
+ */
+
+package org.apache.jmeter.protocol.http.api.auth;
+
+/**
+ * Allows digest customization
+ * @since 4.0
+ */
+public class DigestParameters {
+public static final String VARIABLE_NAME = "__jmeter_DP__";
+private String qop;
+private String nonce;
+private String charset;
+private String algorithm;
+private String opaque;
+/**
+ * 
--- End diff --

I think this class would be better without any of the JavaDoc comments, 
they do not add anything because the class is so simple there's nothing which 
needs commenting.


---


[GitHub] jmeter pull request #320: HTTPClient 4.5. migration to last APIs / Bugzilla ...

2017-11-14 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/320#discussion_r150905177
  
--- Diff: 
src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java ---
@@ -215,22 +269,128 @@ public long getKeepAliveDuration(HttpResponse 
response, HttpContext context) {
 
 };
 
-/**
- * Special interceptor made to keep metrics when connection is 
released for some method like HEAD
- * Otherwise calling directly ((HttpConnection) 
localContext.getAttribute(HttpCoreContext.HTTP_CONNECTION)).getMetrics();
- * would throw org.apache.http.impl.conn.ConnectionShutdownException
- * See https://bz.apache.org/jira/browse/HTTPCLIENT-1081;>HTTPCLIENT-1081
- */
-private static final HttpResponseInterceptor METRICS_SAVER = 
(HttpResponse response, HttpContext context) -> {
-HttpConnectionMetrics metrics = ((HttpConnection) 
context.getAttribute(HttpCoreContext.HTTP_CONNECTION)).getMetrics();
-context.setAttribute(CONTEXT_METRICS, metrics);
-};
-private static final HttpRequestInterceptor METRICS_RESETTER = 
(HttpRequest request, HttpContext context) -> {
-HttpConnectionMetrics metrics = ((HttpConnection) 
context.getAttribute(HttpCoreContext.HTTP_CONNECTION)).getMetrics();
-metrics.reset();
+private static final String DIGEST_PARAMETERS = 
DigestParameters.VARIABLE_NAME;
+
+
+private static final HttpRequestInterceptor 
PREEMPTIVE_AUTH_INTERCEPTOR = new HttpRequestInterceptor() {
--- End diff --

This is almost 100 lines and with lots of nesting becomes very hard to read 
and review, could it be split into smaller methods?


---


[GitHub] jmeter pull request #320: HTTPClient 4.5. migration to last APIs / Bugzilla ...

2017-11-14 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/320#discussion_r150895140
  
--- Diff: 
src/protocol/http/org/apache/jmeter/protocol/http/control/DynamicKerberosSchemeFactory.java
 ---
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.jmeter.protocol.http.control;
+
+import org.apache.http.auth.AuthScheme;
+import org.apache.http.impl.auth.KerberosScheme;
+import org.apache.http.impl.auth.KerberosSchemeFactory;
+import org.apache.http.protocol.HttpContext;
+
+/**
+ * Extends {@link KerberosSchemeFactory} to provide ability to customize 
stripPort
+ * setting in {@link KerberosScheme} based on {@link HttpContext}
+ */
+public class DynamicKerberosSchemeFactory extends KerberosSchemeFactory {
+static final String CONTEXT_ATTRIBUTE_STRIP_PORT = "__jmeter.K_SP__";
+
+/**
+ * @since 4.0
+ */
+public DynamicKerberosSchemeFactory(final boolean stripPort, final 
boolean useCanonicalHostname) {
+super(stripPort, useCanonicalHostname);
+}
+
+@Override
+public AuthScheme create(final HttpContext context) {
+Boolean localStripPort = (Boolean) 
context.getAttribute(CONTEXT_ATTRIBUTE_STRIP_PORT);
+return new KerberosScheme(localStripPort != null ? 
--- End diff --

might be better as a variable rather than a multi-line ternary operator as 
a parameter?
e.g.
```java
Boolean stripPort = localStripPort != null ? localStripPort : isStripPort();
return new KerberosScheme(stripPort, isUseCanonicalHostname());
```


---


[GitHub] jmeter pull request #320: HTTPClient 4.5. migration to last APIs / Bugzilla ...

2017-11-14 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/320#discussion_r150891784
  
--- Diff: 
src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java ---
@@ -97,10 +94,33 @@
 private static final boolean DEFAULT_CLEAR_VALUE = false;
 
 /** Decides whether port should be omitted from SPN for kerberos 
spnego authentication */
-private static final boolean STRIP_PORT = 
JMeterUtils.getPropDefault("kerberos.spnego.strip_port", true);
+public static final boolean STRIP_PORT = 
JMeterUtils.getPropDefault("kerberos.spnego.strip_port", true);
+
+/** Decides whether port should be omitted from SPN for kerberos 
spnego authentication */
+public static final boolean USE_CANONICAL_HOST_NAME = 
JMeterUtils.getPropDefault("kerberos.spnego.use_canonical_host_name", true);
 
 public enum Mechanism {
-BASIC_DIGEST, KERBEROS
+/**
+ * @deprecated (use {@link Mechanism#BASIC})
+ */
+@Deprecated 
+BASIC_DIGEST,
+/**
+ * Basic Auth
+ */
+BASIC, 
+/**
+ * Digest Auth
+ */
+DIGEST, 
+/**
+ * Kerberos Auth
+ */
+KERBEROS
+}
+
+public static void main(String[] args) {
+System.out.println(Mechanism.values());
--- End diff --

Should this be here?


---


[GitHub] jmeter pull request #328: Improve wording and formatting of jmeter.propertie...

2017-11-12 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/328

Improve wording and formatting of jmeter.properties

- fixed some typos,
- re-formatted some lines to aid readability and 
- removed extra whitespace.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter properties_tidy

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/328.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #328


commit a8dcd4b85337d1ca091f13c64a0b85d2876043c4
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-13T00:12:59Z

Improve wording and formatting of jmeter.properties




---


[GitHub] jmeter pull request #327: Utilising more modern Java, simplifying code and f...

2017-11-12 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/327

Utilising more modern Java, simplifying code and formatting code and 
comments

## Description
Three commits covering three types of change:
- Formatting and comment tidy up
- Use modern Java, streams, computeIfAbsent etc.
- Simplify code and reduce nesting

Feel free to take only some, I did this while trying to better understand 
the code.

## Motivation and Context
Improve readability etc.

## How Has This Been Tested?
Ant test, no functional changes.

## Screenshots (if appropriate):

## Types of changes

- Code improvement

## Checklist:


- [x] My code follows the [code style][style-guide] of this project.
- [x] I have updated the documentation accordingly.

[style-guide]: https://wiki.apache.org/jmeter/CodeStyleGuidelines


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter formatting_whitespace_etc

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/327.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #327


commit c12f08f74e83e8959f83792f70cfe8c1500f5a7a
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-11T23:59:10Z

formatting and comment tidy

commit 0274d4139e05bdaf6884790839f4748f253b3bdb
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-12T23:07:44Z

Used modern Java features e.g. streams, computeIfAbsent and enhanced for 
loops.

commit e1c0dca060d22fe52e657b94c21fb1758741b648
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-12T23:33:12Z

Simplify code and reduce nesting




---


[GitHub] jmeter issue #326: Improved PR template

2017-11-10 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/326
  
How can this PR affect code coverage? Do we have tests which are 
non-deterministic and then change the test coverage each run?


---


[GitHub] jmeter pull request #326: Improved PR template

2017-11-10 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/326

Improved PR template

## Description
Removed checkboxes from items which don't all have to be checked.
Added link to code style guidelines (the wiki page should be further 
updated).

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter pr_template_updates

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/326.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #326


commit 84c19f099750e7aac06316ee3681bff01bff94e6
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-10T18:08:12Z

Improved PR template




---


[GitHub] jmeter pull request #324: Save backup refactor

2017-11-09 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/324

Save backup refactor

Further refactoring for readability to `createBackupFile` and other minor 
improvements.

## Description
Refactoring `createBackupFile` and minor tidy up of surrounding code.
I've got a bit carried away but tried to commit often so that at least some 
of the changes can be easily reviewed and applied.

## Motivation and Context
The aim is to improve readability and thus make fixing, testing and 
improving easier.

## How Has This Been Tested?
Manually with both backup settings set. Unit testing is still not very easy.

## Screenshots (if appropriate):

## Types of changes

- [x] Code improvement
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing 
functionality to not work as expected)

## Checklist:


- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter save_backup_refactor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/324.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #324


commit ccf7d0b503c0f1fc53952d36e1e01b9cec089aa4
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T12:26:07Z

removed unused import

commit 0b1c073a17df6081c87dbc09914345d9a414a987
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T12:27:29Z

refactored checkAcceptableForTestFragment for readability

commit 29ac2638fc93c3536b79c9debc8b7cd777d75dc1
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T12:31:30Z

whitespace, strings and comment tidy up

commit 4e13847b4008b6b3b93873107411f005ab7db0e2
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T15:21:58Z

utilised LastModifiedFileComparator

commit 1f4dd8d337fa7532532e4dd8123cc217081a2472
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T16:43:51Z

whitespace etc for readability

commit 863f3566d293f196ed75d8057de93febe85e5e1f
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T16:48:05Z

Moved code to deal with files to delete to separate method

commit a7523a178f84293dbb871cedf74e73390e1a9ff7
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T17:29:45Z

Removed redundant try, catch and use more concise syntax

commit 9eeac9070229eaead36ede36e7d9e5e72f1b82ad
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T19:40:17Z

removed predicate method

commit 487cc43ec66d492ab32f157a9fb0fc1c2e64aa5c
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-09T19:40:52Z

further decomposed backupFilesToDelete




---


[GitHub] jmeter pull request #323: Extracted method and used streams to improve reada...

2017-11-08 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/323

Extracted method and used streams to improve readability



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter save_refactor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/323.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #323






---


[GitHub] jmeter pull request #319: Removed commented out code

2017-11-02 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/319

Removed commented out code



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter remove_commented_out_code

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/319.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #319


commit fe47857791e1d7923b15c15a6e7143d1c8af2787
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-11-02T16:56:03Z

Removed commented out code




---


[GitHub] jmeter pull request #257: Static Analysis Fixes

2017-05-15 Thread ham1
Github user ham1 closed the pull request at:

https://github.com/apache/jmeter/pull/257


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request #260: Manually synchronized on synchronizedMap as per do...

2017-02-27 Thread ham1
Github user ham1 closed the pull request at:

https://github.com/apache/jmeter/pull/260


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request #260: Manually synchronized on synchronizedMap as per do...

2017-01-29 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/260

Manually synchronized on synchronizedMap as per docs and bz55827

Fixes issue identified in 
[bz55827](https://bz.apache.org/bugzilla/show_bug.cgi?id=55827)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter bz55827-synchronized-map

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/260.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #260


commit 380a0f4269c2c8a28d4ffeea2a1c5bc15bde7877
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-01-29T10:05:58Z

manually synchronized on synchronizedMap as per docs and bz55827




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request #259: Refactored and reformatted SmtpSampler

2017-01-27 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/259

Refactored and reformatted SmtpSampler

* Makes sample method much easier to read.
* Minor changes to SendMailCommand

I understand this is a fairly big change with no tests but I thought I'd 
submit anyway in the hope that someone had some good SMTP tests or someone was 
willing to review or even just apply a subset of the changes.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter smtp-refactor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/259.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #259


commit e2c7afd21fd923cce2fcab7c5e31e4f47d5ffc04
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-01-11T19:36:31Z

Refactored and reformatted SmtpSampler to make sample method much easier to 
read.
Minor changes to SendMailCommand




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter issue #257: Static Analysis Fixes

2017-01-27 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/257
  
After reviewing my changes to `org.apache.jmeter.control` they were all 
suggested by my IDE (IntelliJ) so I am confident they are correct - however I 
understand if you don't want to apply some of them due to lack of tests etc.

Should I remove them from this PR or is whoever will apply this ok to 
filter out any risky changes?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter issue #257: Static Analysis Fixes

2017-01-25 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/257
  
Thanks for looking at the PR and commenting.

I will take another look at the changes to `org.apache.jmeter.control` and 
either revert or justify them.
I'd gladly add more tests if we move to Spock ;)

The reason for replacing `StringBuilder` with `+` is for **readability**.

That article shows, that for the simple code i.e. not building a string 
inside loops etc. they are the same i.e. the JVM generates a `StringBuilder` 
for the simple `+` code.
I believe they have the same performance but for me reading:

`"nodeList[" + i + "] " + nodeList.item(i)`
is much easier than:
`new StringBuilder("nodeList[").append(i).append("] 
").append(nodeList.item(i)).toString()`

and

`"Row: " + row`
much easier than:
`new StringBuilder("Row: ").append(row).toString()`

My change in `InfluxdbBackendListenerClient` might be a tiny bit slower due 
to the initial capacity that the JVM might use the default of 16 causing some 
resizing of buffers.

Hope that makes sense.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request #255: Utilised Java 8 (and 7) features to tidy up code

2017-01-22 Thread ham1
Github user ham1 closed the pull request at:

https://github.com/apache/jmeter/pull/255


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter issue #255: Utilised Java 8 (and 7) features to tidy up code

2017-01-22 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/255
  
Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter issue #255: Utilised Java 8 (and 7) features to tidy up code

2017-01-22 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/255
  
Sorry, updated now.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request #255: Utilised Java 8 (and 7) features to tidy up code

2017-01-21 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/255

Utilised Java 8 (and 7) features to tidy up code

Used lambdas, method references, multi-catch blocks and 
`ThreadLocal.withInitial` to improve code readability.
Also removed unnecessary types.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter java8

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/255.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #255


commit 7231600c525be98624e611d488b2f48f9a978a12
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2017-01-21T09:32:08Z

Utilized Java 8 (and 7) features to tidy up code




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter issue #174: Used multi-catch, enhanced for loops, contains and minor ...

2016-06-19 Thread ham1
Github user ham1 commented on the issue:

https://github.com/apache/jmeter/pull/174
  
I've created multiple commits, does this help?

Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Used multi-catch, enhanced for loops, contain...

2016-05-07 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/174#discussion_r62420814
  
--- Diff: src/core/org/apache/jmeter/reporters/ResultCollector.java ---
@@ -386,16 +384,14 @@ public void loadExistingFile() {
 
SaveService.loadTestResults(bufferedInputStream,
 new ResultCollectorHelper(this, 
visualizer));
 parsedOK = true;
-} catch (ConversionException e) {
-log.warn("Failed to load "+filename+" using 
XStream. Error was: "+e);
 } catch (Exception e) {
-log.warn("Failed to load "+filename+" using 
XStream. Error was: "+e);
+log.warn("Failed to load " + filename + " 
using XStream. Error was: " + e);
--- End diff --

Probably, however that would mean changing the rest in this file for 
consistency. I left it as it was as my intention for this PR was for Java 7 
related changes i.e. multi-catch (in this case removing duplicate code and 
'fixing' whitespace while there).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Refactoring of HTTPSamplerBase

2016-05-07 Thread ham1
Github user ham1 closed the pull request at:

https://github.com/apache/jmeter/pull/131


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Used multi-catch, enhanced for loops, contain...

2016-03-28 Thread ham1
Github user ham1 commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/174#discussion_r57560546
  
--- Diff: test/src/org/apache/jmeter/resources/PackageTest.java ---
@@ -136,9 +136,9 @@ private int readRF(String res, List l) throws 
Exception {
  * parameters and check if there is a { in the output. 
A bit
  * crude, but should be enough for now.
  */
-if (val.indexOf("{0}") > 0 && val.indexOf('\'') > 0) {
+if (val.contains("{0}") && val.contains("'")) {
--- End diff --

This change isn't exactly the same as the existing code, however it matches 
the comment, I think the > instead of >= in the original was a mistake.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Used multi-catch, enhanced for loops, contain...

2016-03-28 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/174

Used multi-catch, enhanced for loops, contains and minor formatting



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter java_7

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/174.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #174


commit e5bd5a3a4173ee0f4b08c153895f7c0651ef0162
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-03-21T22:49:45Z

Used multi-catch, enhanced for loops and minor tidy ups while in the files




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Refactoring of HTTPSamplerBase

2016-03-21 Thread ham1
Github user ham1 commented on the pull request:

https://github.com/apache/jmeter/pull/131#issuecomment-199507116
  
@FSchumacher thank you for applying most of my changes. I've updated the PR 
and there are a few more minor things left. Regarding the spelling of that 
constant, I agree, it's probably better to be slightly wrong but consistent 
than inconsistent.

Regarding the delete vs. deprecate, deprecation is probably a good first 
step, but as it's a protected method and it's not used in any of the subclasses 
it seems unlikely that someone is using it?

Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Refactored addKeyData in AbstractGraphConsume...

2016-02-18 Thread ham1
Github user ham1 commented on the pull request:

https://github.com/apache/jmeter/pull/129#issuecomment-185733398
  
@pmouawad Yes, you are correct. Good spot. I will try again and also try to 
keep formatting separate from changes - would 2 commits on the same PR be 
preferred or just 2 PRs for formatting and code change?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Refactored addKeyData in AbstractGraphConsume...

2016-02-18 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/129

Refactored addKeyData in AbstractGraphConsumer and other minor formatting 

Mainly removing duplicate code and renaming things to make it easier to 
understand.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter refactor_and_reformat

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/129.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #129


commit ae13c78bfa38621c46987d524b2224f219aa0a4d
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-17T22:56:31Z

Refactored addKeyData in AbstractGraphConsumer and other minor formatting




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Removing unnecessary (un)boxing

2016-02-17 Thread ham1
Github user ham1 commented on the pull request:

https://github.com/apache/jmeter/pull/123#issuecomment-185449811
  
Updated as per comment.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Removing duplicate code.

2016-02-17 Thread ham1
Github user ham1 commented on the pull request:

https://github.com/apache/jmeter/pull/126#issuecomment-185263205
  
Thanks @pmouawad, I think the comment was for PR #123 instead of this one?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Removing duplicate code.

2016-02-16 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/126

Removing duplicate code.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter remove_duplicate_code

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/126.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #126


commit 60f88f9ecac442c6189d2dcec8487e181e60ebf1
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-14T00:44:26Z

Removing duplicate code.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Removing unnecessary modifiers

2016-02-14 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/122

Removing unnecessary modifiers

Removed final from static and private methods.
Removed static, public and semicolons from enums.
Removed final from interface variables.
Removed ? extends Object.
Fixed a few typos and re-formatted some code while in the same area.


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter remove_unnecessary_things

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/122.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #122


commit ddc07ca781fafd0c8e718a36547e948b48e09c42
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-14T00:35:19Z

Removing unnecessary modifiers - also some other code tidy up in certain 
areas.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Removing unnecessary (un)boxing

2016-02-14 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/123

Removing unnecessary (un)boxing

Removed unnecessary boxing and unboxing of primatives.
Also did a bit of refactoring in AbstractGraphConsumer.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter unneccesary_box_unboxing

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/123.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #123


commit 29fc708b228ca6081a492abc35365e112808beff
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-13T22:20:05Z

Removing unnecessary (un)boxing - also some other code tidy up while in 
some messy areas.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Fixed some JavaDoc errors.

2016-02-13 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/118

Fixed some JavaDoc errors.



You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter java_doc

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/118.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #118


commit 3807c90be0b66d946c467f8177dcfbe603e3e0f1
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-13T12:15:12Z

Fixed some JavaDoc errors.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Using Try with Resources.

2016-02-13 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/119

Using Try with Resources.

Used the try with resources instead of try finally, also fixed a typo while 
in the same area.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter try_with_res

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/119.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #119


commit 649472b78b6afe54c89ee7d24a9a765e3e7ad86a
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-13T12:26:02Z

Using Try with Resources.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Removing unnecessary continues and a few othe...

2016-02-13 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/121

Removing unnecessary continues and a few other tidy ups.

Removed empty comments, fixed spelling mistakes, fixed whitespace, 
simplified some if statements.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter unnecessary_continues

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/121.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #121


commit 187af854a70406c9c8131041fa46752951fd06f2
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-13T18:22:04Z

Removing unnecessary continues and a few other tidy ups.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Used foreach where possible.

2016-02-10 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/114

Used foreach where possible.

https://bz.apache.org/bugzilla/show_bug.cgi?id=57981

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter for_each

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/114.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #114


commit b569729d3e7272f7f083a090da49d51642824970
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-07T23:36:26Z

Used foreach where possible.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] jmeter pull request: Used multi-catch where possible

2016-02-07 Thread ham1
GitHub user ham1 opened a pull request:

https://github.com/apache/jmeter/pull/110

Used multi-catch where possible

More Java 7 changes. Related to 
https://bz.apache.org/bugzilla/show_bug.cgi?id=57981

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ham1/jmeter try_catch

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jmeter/pull/110.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #110


commit f7faee83cec336c9885d65377d5316967d1d12bc
Author: Graham Russell <gra...@ham1.co.uk>
Date:   2016-02-07T18:18:51Z

Used multi-catch where possible.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


  1   2   >