Re: svn commit: r1735170 - /jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java

2016-03-15 Thread sebb
Thanks, that should do it.

On 15 March 2016 at 21:37,   wrote:
> Author: pmouawad
> Date: Tue Mar 15 21:37:38 2016
> New Revision: 1735170
>
> URL: http://svn.apache.org/viewvc?rev=1735170&view=rev
> Log:
> Bug 59173 - New fields/changed defaults cause earlier test plans to be marked 
> as changed
> Fix RegExtractor saving with 3.0
> Bugzilla Id: 59173
>
> Modified:
> 
> jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
>
> Modified: 
> jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java
> URL: 
> http://svn.apache.org/viewvc/jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java?rev=1735170&r1=1735169&r2=1735170&view=diff
> ==
> --- 
> jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java 
> (original)
> +++ 
> jmeter/trunk/src/components/org/apache/jmeter/extractor/RegexExtractor.java 
> Tue Mar 15 21:37:38 2016
> @@ -46,7 +46,7 @@ import org.apache.oro.text.regex.Perl5Ma
>
>  public class RegexExtractor extends AbstractScopedTestElement implements 
> PostProcessor, Serializable {
>
> -private static final long serialVersionUID = 240L;
> +private static final long serialVersionUID = 241L;
>
>  private static final Logger log = LoggingManager.getLoggerForClass();
>
> @@ -87,6 +87,8 @@ public class RegexExtractor extends Abst
>
>  private static final String UNDERSCORE = "_";  // $NON-NLS-1$
>
> +private static final boolean DEFAULT_VALUE_FOR_DEFAULT_EMPTY_VALUE = 
> false;
> +
>  private transient List template;
>
>  /**
> @@ -449,7 +451,7 @@ public class RegexExtractor extends Abst
>   * @param defaultEmptyValue The default value for the variable
>   */
>  public void setDefaultEmptyValue(boolean defaultEmptyValue) {
> -setProperty(DEFAULT_EMPTY_VALUE, defaultEmptyValue);
> +setProperty(DEFAULT_EMPTY_VALUE, defaultEmptyValue, 
> DEFAULT_VALUE_FOR_DEFAULT_EMPTY_VALUE);
>  }
>
>  /**
> @@ -466,7 +468,7 @@ public class RegexExtractor extends Abst
>   * Do we set default value to "" value when if it's empty
>   */
>  public boolean isEmptyDefaultValue() {
> -return getPropertyAsBoolean(DEFAULT_EMPTY_VALUE);
> +return getPropertyAsBoolean(DEFAULT_EMPTY_VALUE, 
> DEFAULT_VALUE_FOR_DEFAULT_EMPTY_VALUE);
>  }
>
>  public void setTemplate(String template) {
>
>


Re: Remaining Work before Release of 3.0

2016-03-15 Thread Philippe Mouawad
On Tue, Mar 15, 2016 at 9:45 PM, Felix Schumacher <
felix.schumac...@internetallee.de> wrote:

>
>
> Am 14. März 2016 21:58:50 MEZ, schrieb Philippe Mouawad <
> philippe.moua...@gmail.com>:
> >On Monday, March 14, 2016, Felix Schumacher <
> >felix.schumac...@internetallee.de> wrote:
> >
> >> Am 14.03.2016 um 21:34 schrieb Philippe Mouawad:
> >>
> >>> Hello,
> >>> All remaining issues before 3.0 are now fixed.
> >>>
> >> https://issues.apache.org/jira/browse/HTTPCLIENT-1712
> >> means that we can't do kerberos with https. Is this a big problem?
> >
> >
> >are we able to workaround in jmeter the issue ?
> >If not it would mean we have to wait for a 4.5.3
> >
> >It does not seem critical for me but I don't know
>
> We could work around it. We would have to subclass two classes.
> SPnegoScheme and its factory.
>
Let's do that Felix if you think we need to fix it before 3.0.

>
> The problem is fixed in httpclients trunk, but I don't know when a next
> release is planned.
>

4.5.2 was just released, I doubt a new one will be released for such a bug


>
> Felix
>
> >
> >>
> >> Felix
> >>
> >>>
> >>> Except for the documentation screenshots everything is ready for a
> >>> release.
> >>>
> >>> When do we launch the release of 3.0 ?
> >>>
> >>> Regards
> >>> Philippe
> >>>
> >>>
> >>> On Fri, Mar 11, 2016 at 8:20 AM, Milamber 
> >wrote:
> >>>
> >>>
>  On 08/03/2016 23:02, Philippe Mouawad wrote:
> 
>  @Milamber, do you intend to take into account before 3.0 release
> >the
> > notes
> > from Benoit Wiart:
> > -https://bz.apache.org/bugzilla/show_bug.cgi?id=58426
> >
> > Not before the 3.0.
> 
> 
>  If not, I suggest we close this one and open a new one to complete
> >HiDPI
> > support in 3.1
> >
> > That seems a good idea.
> 
> 
>  Milamber
> 
> 
> >>>
> >>>
> >>
>
>


-- 
Cordialement.
Philippe Mouawad.


Re: Remaining Work before Release of 3.0

2016-03-15 Thread Felix Schumacher


Am 14. März 2016 21:58:50 MEZ, schrieb Philippe Mouawad 
:
>On Monday, March 14, 2016, Felix Schumacher <
>felix.schumac...@internetallee.de> wrote:
>
>> Am 14.03.2016 um 21:34 schrieb Philippe Mouawad:
>>
>>> Hello,
>>> All remaining issues before 3.0 are now fixed.
>>>
>> https://issues.apache.org/jira/browse/HTTPCLIENT-1712
>> means that we can't do kerberos with https. Is this a big problem?
>
>
>are we able to workaround in jmeter the issue ?
>If not it would mean we have to wait for a 4.5.3
>
>It does not seem critical for me but I don't know

We could work around it. We would have to subclass two classes. SPnegoScheme 
and its factory. 

The problem is fixed in httpclients trunk, but I don't know when a next release 
is planned. 

Felix

>
>>
>> Felix
>>
>>>
>>> Except for the documentation screenshots everything is ready for a
>>> release.
>>>
>>> When do we launch the release of 3.0 ?
>>>
>>> Regards
>>> Philippe
>>>
>>>
>>> On Fri, Mar 11, 2016 at 8:20 AM, Milamber 
>wrote:
>>>
>>>
 On 08/03/2016 23:02, Philippe Mouawad wrote:

 @Milamber, do you intend to take into account before 3.0 release
>the
> notes
> from Benoit Wiart:
> -https://bz.apache.org/bugzilla/show_bug.cgi?id=58426
>
> Not before the 3.0.


 If not, I suggest we close this one and open a new one to complete
>HiDPI
> support in 3.1
>
> That seems a good idea.


 Milamber


>>>
>>>
>>



[GitHub] jmeter pull request: bug59153_CSVDataSetFilesExceptions

2016-03-15 Thread ra0077
Github user ra0077 commented on the pull request:

https://github.com/apache/jmeter/pull/167#issuecomment-196829738
  
Ok

I will wait other review or a go before modify my PR to avoid problem like 
in my previous PR about this bug

Antonio


---
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: bug59153_CSVDataSetFilesExceptions

2016-03-15 Thread vlsi
Github user vlsi commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/167#discussion_r56164700
  
--- Diff: src/core/org/apache/jmeter/services/FileServer.java ---
@@ -428,6 +429,9 @@ private BufferedReader createBufferedReader(FileEntry 
fileEntry) throws IOExcept
 isr = new InputStreamReader(fis);
 }
 return new BufferedReader(isr);
+} else {
+throw new IllegalArgumentException("File "+ 
fileEntry.file.getName()+ " must exist and be readable");
--- End diff --

Please move `else` branch to the start of the method.


---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread ra0077
Github user ra0077 commented on the pull request:

https://github.com/apache/jmeter/pull/162#issuecomment-196816472
  
New PR 167 submittted



---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread ra0077
Github user ra0077 closed the pull request at:

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


---
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.
---


Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread Antonio Gomes Rodrigues
New PR submited

PR 167

Now I throw I more clear IllegalArgumentException if filename is empty

And a more clear IllegalArgumentException if there is an access problems
(not a file, not readeable, not exist) with filename

I don't have formatting it to allow easy review

Antonio

2016-03-15 13:33 GMT+01:00 Antonio Gomes Rodrigues :

> Hi
>
> 2016-03-15 12:32 GMT+01:00 sebb :
>
>> On 15 March 2016 at 11:15, Antonio Gomes Rodrigues 
>> wrote:
>> > For the moment we have only a FileNotFoundException and this error
>> "ERROR -
>> > jmeter.threads.JMeterThread: Test failed!
>> > java.lang.IllegalArgumentException: Could not read file header line"
>> >
>> > Like you can see is not very usefull
>>
>> However later in the stack trace you will see something like:
>>
>> Caused by: java.io.FileNotFoundException: /workspace/JMeter/bin/xyz
>> (No such file or directory)
>>
>
> It's usefull for you because youre are a developper.
>
> A user which see this error will not necesary understand (no knowledge of
> Java exception, etc.)
>
> And I don't think it's a good idea to show exception to users
>
>
>>
>> > I will work in another file problems (not present, not readable, etc.)
>> in
>> > another PR
>> >
>> > For the moment I have just make this PR to alert user without stacktrace
>> > when he forget to setup the file name.
>> >
>> > Are you ok to have two PR or do you want I try to make only one PR with
>> all
>> > the possible problem?
>>
>> There is only one problem - cannot read the file.
>>
>> > My opinion is to have 2 PR (this one to non setup file name and another
>> to
>> > access problem to the file)
>>
>> Again, I don't see the point of having two separate processes.
>> Just catch the IllegalArgumentException and report it (with the cause if
>> any)
>>
>
> I will try to do it asap
>
> Antonio
>
>>
>> >
>> > Antonio
>> >
>> >
>> >
>> >
>> > Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
>> > www.avast.com
>> > <
>> https://www.avast.com/fr-fr/lp-safe-emailing?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=OA-2109-A
>> >
>> > <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>> >
>> > 2016-03-15 11:51 GMT+01:00 sebb :
>> >
>> >> On 15 March 2016 at 09:30, ra0077  wrote:
>> >> > Github user ra0077 commented on the pull request:
>> >> >
>> >> > https://github.com/apache/jmeter/pull/162#issuecomment-196740857
>> >> >
>> >> > I have swap it and remove formating to be easy to read it
>> >> >
>> >> > What I do is:
>> >> > check if the user have put a file name
>> >> > if not
>> >> > log it to allow easy debuging
>> >> > stop the test
>> >> > if yes
>> >> > no modification
>> >> >
>> >> >
>> >> > It allow to easy debug (a clear message in log) and avoid to
>> have an
>> >> > exception to user
>> >> >
>> >> >
>> >> >
>> >> > The diff with the trunk:
>> >> >
>> >> > --- a/src/components/org/apache/jmeter/config/CSVDataSet.java
>> >> > +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
>> >> > @@ -146,6 +146,11 @@ public class CSVDataSet extends
>> >> ConfigTestElement
>> >> >
>> >> >  @Override
>> >> >  public void iterationStart(LoopIterationEvent iterEvent) {
>> >> > +String _fileName = getFilename();
>> >> > +if (_fileName.isEmpty()) {
>> >> > +log.error("No filename setup in CSV Data Set Config:
>> >> > "+this.getName());
>> >> > +throw new JMeterStopThreadException("No filename
>> setup
>> >> in CSV
>> >> > Data Set Config: "+this.getName());
>> >> > +} else {
>> >> >  FileServer server = FileServer.getFileServer();
>> >> >  final JMeterContext context = getThreadContext();
>> >> >  String delim = getDelimiter();
>> >> > @@ -156,7 +161,6 @@ public class CSVDataSet extends
>> ConfigTestElement
>> >> >  delim=",";
>> >> >  }
>> >> >  if (vars == null) {
>> >> > -String _fileName = getFilename();
>> >> >  String mode = getShareMode();
>> >> >  int modeInt =
>> >> CSVDataSetBeanInfo.getShareModeAsInt(mode);
>> >> >  switch(modeInt){
>> >> > @@ -212,6 +216,7 @@ public class CSVDataSet extends
>> ConfigTestElement
>> >> >  threadVars.put(var, EOFVALUE);
>> >> >  }
>> >> >  }
>> >> > +}
>> >> >  }
>> >>
>> >> Thanks, that is more legible
>> >> (though the mail software causes wrapping issues)
>> >>
>> >> That looks OK.
>> >> Though if one wants to avoid the stacktrace appearing in the log it
>> >> might just be simpler to change the log message to drop the stack
>> >> trace for the incorrect filename case as well.
>> >> Does the stacktrace help for that case? I suspect not.
>> >> I think that would be a more useful fix.
>> >>
>> >> > Antonio
>> >> >
>> >> > Cet e-mail a été envoyé depuis un ordinateu

[GitHub] jmeter pull request: bug59153_CSVDataSetFilesExceptions

2016-03-15 Thread ra0077
GitHub user ra0077 opened a pull request:

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

bug59153_CSVDataSetFilesExceptions

More clear message for CSV Data Set with 
filename empty
wrong filename (not readable, not exist)

I don't have made formating to help reviewing

If anybody is ok, I will format it

Antonio

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

$ git pull https://github.com/ra0077/jmeter 
bug59153_CSVDataSetFilesExceptions

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

https://github.com/apache/jmeter/pull/167.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 #167


commit 7314516850021a157497c1fc83b796a01a98b29a
Author: ra0077 
Date:   2016-03-15T13:22:52Z

bug59153_CSVDataSetFilesExceptions

More clear message for CSV Data Set with 
filename empty
wrong filename (not readable, not exist)

I don't have made formating to help reviewing

If anybody is ok, I will format it

Antonio




---
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.
---


Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread Antonio Gomes Rodrigues
Hi

2016-03-15 12:32 GMT+01:00 sebb :

> On 15 March 2016 at 11:15, Antonio Gomes Rodrigues 
> wrote:
> > For the moment we have only a FileNotFoundException and this error
> "ERROR -
> > jmeter.threads.JMeterThread: Test failed!
> > java.lang.IllegalArgumentException: Could not read file header line"
> >
> > Like you can see is not very usefull
>
> However later in the stack trace you will see something like:
>
> Caused by: java.io.FileNotFoundException: /workspace/JMeter/bin/xyz
> (No such file or directory)
>

It's usefull for you because youre are a developper.

A user which see this error will not necesary understand (no knowledge of
Java exception, etc.)

And I don't think it's a good idea to show exception to users


>
> > I will work in another file problems (not present, not readable, etc.) in
> > another PR
> >
> > For the moment I have just make this PR to alert user without stacktrace
> > when he forget to setup the file name.
> >
> > Are you ok to have two PR or do you want I try to make only one PR with
> all
> > the possible problem?
>
> There is only one problem - cannot read the file.
>
> > My opinion is to have 2 PR (this one to non setup file name and another
> to
> > access problem to the file)
>
> Again, I don't see the point of having two separate processes.
> Just catch the IllegalArgumentException and report it (with the cause if
> any)
>

I will try to do it asap

Antonio

>
> >
> > Antonio
> >
> >
> >
> >
> > Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
> > www.avast.com
> > <
> https://www.avast.com/fr-fr/lp-safe-emailing?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=OA-2109-A
> >
> > <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >
> > 2016-03-15 11:51 GMT+01:00 sebb :
> >
> >> On 15 March 2016 at 09:30, ra0077  wrote:
> >> > Github user ra0077 commented on the pull request:
> >> >
> >> > https://github.com/apache/jmeter/pull/162#issuecomment-196740857
> >> >
> >> > I have swap it and remove formating to be easy to read it
> >> >
> >> > What I do is:
> >> > check if the user have put a file name
> >> > if not
> >> > log it to allow easy debuging
> >> > stop the test
> >> > if yes
> >> > no modification
> >> >
> >> >
> >> > It allow to easy debug (a clear message in log) and avoid to have
> an
> >> > exception to user
> >> >
> >> >
> >> >
> >> > The diff with the trunk:
> >> >
> >> > --- a/src/components/org/apache/jmeter/config/CSVDataSet.java
> >> > +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
> >> > @@ -146,6 +146,11 @@ public class CSVDataSet extends
> >> ConfigTestElement
> >> >
> >> >  @Override
> >> >  public void iterationStart(LoopIterationEvent iterEvent) {
> >> > +String _fileName = getFilename();
> >> > +if (_fileName.isEmpty()) {
> >> > +log.error("No filename setup in CSV Data Set Config:
> >> > "+this.getName());
> >> > +throw new JMeterStopThreadException("No filename
> setup
> >> in CSV
> >> > Data Set Config: "+this.getName());
> >> > +} else {
> >> >  FileServer server = FileServer.getFileServer();
> >> >  final JMeterContext context = getThreadContext();
> >> >  String delim = getDelimiter();
> >> > @@ -156,7 +161,6 @@ public class CSVDataSet extends
> ConfigTestElement
> >> >  delim=",";
> >> >  }
> >> >  if (vars == null) {
> >> > -String _fileName = getFilename();
> >> >  String mode = getShareMode();
> >> >  int modeInt =
> >> CSVDataSetBeanInfo.getShareModeAsInt(mode);
> >> >  switch(modeInt){
> >> > @@ -212,6 +216,7 @@ public class CSVDataSet extends
> ConfigTestElement
> >> >  threadVars.put(var, EOFVALUE);
> >> >  }
> >> >  }
> >> > +}
> >> >  }
> >>
> >> Thanks, that is more legible
> >> (though the mail software causes wrapping issues)
> >>
> >> That looks OK.
> >> Though if one wants to avoid the stacktrace appearing in the log it
> >> might just be simpler to change the log message to drop the stack
> >> trace for the incorrect filename case as well.
> >> Does the stacktrace help for that case? I suspect not.
> >> I think that would be a more useful fix.
> >>
> >> > Antonio
> >> >
> >> > Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
> >> > www.avast.com
> >> > <
> >>
> https://www.avast.com/fr-fr/lp-safe-emailing?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=OA-2109-A
> >> >
> >> > <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >> >
> >> > 2016-03-15 9:13 GMT+01:00 Vladimir Sitnikov <
> >> notificati...@github.com>:
> >> >
> >> > > I don't have modify these lines.
> >> > >
> >> > > @ra0077 , can you please

[GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread vlsi
Github user vlsi commented on the pull request:

https://github.com/apache/jmeter/pull/162#issuecomment-196795299
  
>I have swap it and remove formating to be easy to read it

@ra0077, would you please update the PR then?


---
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.
---


Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread sebb
On 15 March 2016 at 11:15, Antonio Gomes Rodrigues  wrote:
> For the moment we have only a FileNotFoundException and this error "ERROR -
> jmeter.threads.JMeterThread: Test failed!
> java.lang.IllegalArgumentException: Could not read file header line"
>
> Like you can see is not very usefull

However later in the stack trace you will see something like:

Caused by: java.io.FileNotFoundException: /workspace/JMeter/bin/xyz
(No such file or directory)

> I will work in another file problems (not present, not readable, etc.) in
> another PR
>
> For the moment I have just make this PR to alert user without stacktrace
> when he forget to setup the file name.
>
> Are you ok to have two PR or do you want I try to make only one PR with all
> the possible problem?

There is only one problem - cannot read the file.

> My opinion is to have 2 PR (this one to non setup file name and another to
> access problem to the file)

Again, I don't see the point of having two separate processes.
Just catch the IllegalArgumentException and report it (with the cause if any)

>
> Antonio
>
>
>
>
> Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
> www.avast.com
> 
> <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> 2016-03-15 11:51 GMT+01:00 sebb :
>
>> On 15 March 2016 at 09:30, ra0077  wrote:
>> > Github user ra0077 commented on the pull request:
>> >
>> > https://github.com/apache/jmeter/pull/162#issuecomment-196740857
>> >
>> > I have swap it and remove formating to be easy to read it
>> >
>> > What I do is:
>> > check if the user have put a file name
>> > if not
>> > log it to allow easy debuging
>> > stop the test
>> > if yes
>> > no modification
>> >
>> >
>> > It allow to easy debug (a clear message in log) and avoid to have an
>> > exception to user
>> >
>> >
>> >
>> > The diff with the trunk:
>> >
>> > --- a/src/components/org/apache/jmeter/config/CSVDataSet.java
>> > +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
>> > @@ -146,6 +146,11 @@ public class CSVDataSet extends
>> ConfigTestElement
>> >
>> >  @Override
>> >  public void iterationStart(LoopIterationEvent iterEvent) {
>> > +String _fileName = getFilename();
>> > +if (_fileName.isEmpty()) {
>> > +log.error("No filename setup in CSV Data Set Config:
>> > "+this.getName());
>> > +throw new JMeterStopThreadException("No filename setup
>> in CSV
>> > Data Set Config: "+this.getName());
>> > +} else {
>> >  FileServer server = FileServer.getFileServer();
>> >  final JMeterContext context = getThreadContext();
>> >  String delim = getDelimiter();
>> > @@ -156,7 +161,6 @@ public class CSVDataSet extends ConfigTestElement
>> >  delim=",";
>> >  }
>> >  if (vars == null) {
>> > -String _fileName = getFilename();
>> >  String mode = getShareMode();
>> >  int modeInt =
>> CSVDataSetBeanInfo.getShareModeAsInt(mode);
>> >  switch(modeInt){
>> > @@ -212,6 +216,7 @@ public class CSVDataSet extends ConfigTestElement
>> >  threadVars.put(var, EOFVALUE);
>> >  }
>> >  }
>> > +}
>> >  }
>>
>> Thanks, that is more legible
>> (though the mail software causes wrapping issues)
>>
>> That looks OK.
>> Though if one wants to avoid the stacktrace appearing in the log it
>> might just be simpler to change the log message to drop the stack
>> trace for the incorrect filename case as well.
>> Does the stacktrace help for that case? I suspect not.
>> I think that would be a more useful fix.
>>
>> > Antonio
>> >
>> > Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
>> > www.avast.com
>> > <
>> https://www.avast.com/fr-fr/lp-safe-emailing?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=OA-2109-A
>> >
>> > <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>> >
>> > 2016-03-15 9:13 GMT+01:00 Vladimir Sitnikov <
>> notificati...@github.com>:
>> >
>> > > I don't have modify these lines.
>> > >
>> > > @ra0077 , can you please rework the PR
>> without
>> > > reformatting the whole method?
>> > >
>> > > —
>> > > You are receiving this because you were mentioned.
>> > > Reply to this email directly or view it on GitHub:
>> > > https://github.com/apache/jmeter/pull/162#issuecomment-196710977
>> > >
>> >
>> >
>> >
>> > ---
>> > 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 wor

Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread Antonio Gomes Rodrigues
For the moment we have only a FileNotFoundException and this error "ERROR -
jmeter.threads.JMeterThread: Test failed!
java.lang.IllegalArgumentException: Could not read file header line"

Like you can see is not very usefull

I will work in another file problems (not present, not readable, etc.) in
another PR

For the moment I have just make this PR to alert user without stacktrace
when he forget to setup the file name.

Are you ok to have two PR or do you want I try to make only one PR with all
the possible problem?

My opinion is to have 2 PR (this one to non setup file name and another to
access problem to the file)


Antonio




Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
www.avast.com

<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

2016-03-15 11:51 GMT+01:00 sebb :

> On 15 March 2016 at 09:30, ra0077  wrote:
> > Github user ra0077 commented on the pull request:
> >
> > https://github.com/apache/jmeter/pull/162#issuecomment-196740857
> >
> > I have swap it and remove formating to be easy to read it
> >
> > What I do is:
> > check if the user have put a file name
> > if not
> > log it to allow easy debuging
> > stop the test
> > if yes
> > no modification
> >
> >
> > It allow to easy debug (a clear message in log) and avoid to have an
> > exception to user
> >
> >
> >
> > The diff with the trunk:
> >
> > --- a/src/components/org/apache/jmeter/config/CSVDataSet.java
> > +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
> > @@ -146,6 +146,11 @@ public class CSVDataSet extends
> ConfigTestElement
> >
> >  @Override
> >  public void iterationStart(LoopIterationEvent iterEvent) {
> > +String _fileName = getFilename();
> > +if (_fileName.isEmpty()) {
> > +log.error("No filename setup in CSV Data Set Config:
> > "+this.getName());
> > +throw new JMeterStopThreadException("No filename setup
> in CSV
> > Data Set Config: "+this.getName());
> > +} else {
> >  FileServer server = FileServer.getFileServer();
> >  final JMeterContext context = getThreadContext();
> >  String delim = getDelimiter();
> > @@ -156,7 +161,6 @@ public class CSVDataSet extends ConfigTestElement
> >  delim=",";
> >  }
> >  if (vars == null) {
> > -String _fileName = getFilename();
> >  String mode = getShareMode();
> >  int modeInt =
> CSVDataSetBeanInfo.getShareModeAsInt(mode);
> >  switch(modeInt){
> > @@ -212,6 +216,7 @@ public class CSVDataSet extends ConfigTestElement
> >  threadVars.put(var, EOFVALUE);
> >  }
> >  }
> > +}
> >  }
>
> Thanks, that is more legible
> (though the mail software causes wrapping issues)
>
> That looks OK.
> Though if one wants to avoid the stacktrace appearing in the log it
> might just be simpler to change the log message to drop the stack
> trace for the incorrect filename case as well.
> Does the stacktrace help for that case? I suspect not.
> I think that would be a more useful fix.
>
> > Antonio
> >
> > Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
> > www.avast.com
> > <
> https://www.avast.com/fr-fr/lp-safe-emailing?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail&utm_term=OA-2109-A
> >
> > <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
> >
> > 2016-03-15 9:13 GMT+01:00 Vladimir Sitnikov <
> notificati...@github.com>:
> >
> > > I don't have modify these lines.
> > >
> > > @ra0077 , can you please rework the PR
> without
> > > reformatting the whole method?
> > >
> > > —
> > > You are receiving this because you were mentioned.
> > > Reply to this email directly or view it on GitHub:
> > > https://github.com/apache/jmeter/pull/162#issuecomment-196710977
> > >
> >
> >
> >
> > ---
> > 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.
> > ---
>


Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread sebb
On 15 March 2016 at 09:30, ra0077  wrote:
> Github user ra0077 commented on the pull request:
>
> https://github.com/apache/jmeter/pull/162#issuecomment-196740857
>
> I have swap it and remove formating to be easy to read it
>
> What I do is:
> check if the user have put a file name
> if not
> log it to allow easy debuging
> stop the test
> if yes
> no modification
>
>
> It allow to easy debug (a clear message in log) and avoid to have an
> exception to user
>
>
>
> The diff with the trunk:
>
> --- a/src/components/org/apache/jmeter/config/CSVDataSet.java
> +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
> @@ -146,6 +146,11 @@ public class CSVDataSet extends ConfigTestElement
>
>  @Override
>  public void iterationStart(LoopIterationEvent iterEvent) {
> +String _fileName = getFilename();
> +if (_fileName.isEmpty()) {
> +log.error("No filename setup in CSV Data Set Config:
> "+this.getName());
> +throw new JMeterStopThreadException("No filename setup in CSV
> Data Set Config: "+this.getName());
> +} else {
>  FileServer server = FileServer.getFileServer();
>  final JMeterContext context = getThreadContext();
>  String delim = getDelimiter();
> @@ -156,7 +161,6 @@ public class CSVDataSet extends ConfigTestElement
>  delim=",";
>  }
>  if (vars == null) {
> -String _fileName = getFilename();
>  String mode = getShareMode();
>  int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
>  switch(modeInt){
> @@ -212,6 +216,7 @@ public class CSVDataSet extends ConfigTestElement
>  threadVars.put(var, EOFVALUE);
>  }
>  }
> +}
>  }

Thanks, that is more legible
(though the mail software causes wrapping issues)

That looks OK.
Though if one wants to avoid the stacktrace appearing in the log it
might just be simpler to change the log message to drop the stack
trace for the incorrect filename case as well.
Does the stacktrace help for that case? I suspect not.
I think that would be a more useful fix.

> Antonio
>
> Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
> www.avast.com
> 
> 
> <#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> 2016-03-15 9:13 GMT+01:00 Vladimir Sitnikov :
>
> > I don't have modify these lines.
> >
> > @ra0077 , can you please rework the PR 
> without
> > reformatting the whole method?
> >
> > —
> > You are receiving this because you were mentioned.
> > Reply to this email directly or view it on GitHub:
> > https://github.com/apache/jmeter/pull/162#issuecomment-196710977
> >
>
>
>
> ---
> 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.
> ---


Re: Bug 59171 - sort order for Sample Result config dialog

2016-03-15 Thread sebb
On 15 March 2016 at 07:51, Philippe Mouawad  wrote:
> On Tue, Mar 15, 2016 at 1:31 AM, sebb  wrote:
>
>> On 14 March 2016 at 22:32, Philippe Mouawad 
>> wrote:
>> > from user point of view, a user does not  know attribute names,
>>
>> But they won't necessarily know the exact name for each attribute
>> either, and the order depends on the exact name.
>> They are hopefully reasonably common names for the values, but there's
>> no standard for the names.
>> [Unlike say the names of countries or languages.]
>>
>>
> If I take the french example, alphabetical order seems the best option.

But the same applies - unless you know in advance what the name is,
how does it help?

For example, the length of a response could be
Content Length
Response Length
Length of Response
Count (Bytes)
Byte Count
etc.

> As attribute names are not known, documentation references english labels.
>
> An alternative option is to always use the English (documentation) sort
> order , this way people can refer to it in other languages and select the
> options.

That would work for me; a bit more tedious to set up initially, but
would also handle new attributes better (assuming they were added at
the end)

>
>>
>> > So I
>> > suppose the best presentation is probably an alphabetical sort , this is
>> > how I usually proceed in the Ux is use.
>>
>> But the problem is that it is Locale-specific.
>>
>> Further, if we change the translation of any attribute, the order may
>> change.
>>
>> Whereas if we sort by attribute name, the order is fixed across
>> languages, and people can get used to where they are.
>>
>> > On Monday, March 14, 2016, sebb  wrote:
>> >
>> >> Are there any other opinions on this?
>> >>
>> >> Only Philippe has commented that he prefers ordering by Locale-specific
>> >> text.
>> >>
>> >> I would prefer ordering by attribute name, as that does not vary when
>> >> switching languages.
>> >> It's also not very different in the English version (probably because
>> >> the attribute names are in English)
>> >>
>> >> So it's not clear what the order should be.
>> >>
>> >> Comments please.
>> >>
>> >
>> >
>> > --
>> > Cordialement.
>> > Philippe Mouawad.
>>
>
>
>
> --
> Cordialement.
> Philippe Mouawad.


[GitHub] jmeter pull request: add json assertion

2016-03-15 Thread buaawp
Github user buaawp closed the pull request at:

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


---
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: add json assertion

2016-03-15 Thread buaawp
GitHub user buaawp opened a pull request:

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

add json assertion



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

$ git pull https://github.com/buaawp/jmeter trunk

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

https://github.com/apache/jmeter/pull/166.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 #166


commit 04195b0ee73c71cdc20023fb644bcacaa5038646
Author: wangpeng 
Date:   2016-03-15T09:41:02Z

add json assertion




---
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: Add JSON assertion

2016-03-15 Thread buaawp
Github user buaawp closed the pull request at:

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


---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread ra0077
Github user ra0077 commented on the pull request:

https://github.com/apache/jmeter/pull/162#issuecomment-196740857
  
I have swap it and remove formating to be easy to read it

What I do is:
check if the user have put a file name
if not
log it to allow easy debuging
stop the test
if yes
no modification


It allow to easy debug (a clear message in log) and avoid to have an
exception to user



The diff with the trunk:

--- a/src/components/org/apache/jmeter/config/CSVDataSet.java
+++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
@@ -146,6 +146,11 @@ public class CSVDataSet extends ConfigTestElement

 @Override
 public void iterationStart(LoopIterationEvent iterEvent) {
+String _fileName = getFilename();
+if (_fileName.isEmpty()) {
+log.error("No filename setup in CSV Data Set Config:
"+this.getName());
+throw new JMeterStopThreadException("No filename setup in CSV
Data Set Config: "+this.getName());
+} else {
 FileServer server = FileServer.getFileServer();
 final JMeterContext context = getThreadContext();
 String delim = getDelimiter();
@@ -156,7 +161,6 @@ public class CSVDataSet extends ConfigTestElement
 delim=",";
 }
 if (vars == null) {
-String _fileName = getFilename();
 String mode = getShareMode();
 int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
 switch(modeInt){
@@ -212,6 +216,7 @@ public class CSVDataSet extends ConfigTestElement
 threadVars.put(var, EOFVALUE);
 }
 }
+}
 }

Antonio

Cet e-mail a été envoyé depuis un ordinateur protégé par Avast.
www.avast.com


<#DDB4FAA8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

2016-03-15 9:13 GMT+01:00 Vladimir Sitnikov :

> I don't have modify these lines.
>
> @ra0077 , can you please rework the PR without
> reformatting the whole method?
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly or view it on GitHub:
> https://github.com/apache/jmeter/pull/162#issuecomment-196710977
>



---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread ra0077
Github user ra0077 commented on the pull request:

https://github.com/apache/jmeter/pull/162#issuecomment-196740926
  
I have swap it and remove formating to be easy to read it

What I do is:
check if the user have put a file name
if not
  log it to allow easy debuging
  stop the test
if yes
  no modification


It allow to easy debug (a clear message in log) and avoid to have an 
exception to user



The diff with the trunk:

--- a/src/components/org/apache/jmeter/config/CSVDataSet.java
+++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
@@ -146,6 +146,11 @@ public class CSVDataSet extends ConfigTestElement
 
 @Override
 public void iterationStart(LoopIterationEvent iterEvent) {
+String _fileName = getFilename();
+if (_fileName.isEmpty()) {
+log.error("No filename setup in CSV Data Set Config: 
"+this.getName());
+throw new JMeterStopThreadException("No filename setup in CSV 
Data Set Config: "+this.getName());
+} else {
 FileServer server = FileServer.getFileServer();
 final JMeterContext context = getThreadContext();
 String delim = getDelimiter();
@@ -156,7 +161,6 @@ public class CSVDataSet extends ConfigTestElement
 delim=",";
 }
 if (vars == null) {
-String _fileName = getFilename();
 String mode = getShareMode();
 int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
 switch(modeInt){
@@ -212,6 +216,7 @@ public class CSVDataSet extends ConfigTestElement
 threadVars.put(var, EOFVALUE);
 }
 }
+}
 }




---
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: Add JSON assertion

2016-03-15 Thread buaawp
GitHub user buaawp reopened a pull request:

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

Add JSON assertion



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

$ git pull https://github.com/buaawp/jmeter trunk

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

https://github.com/apache/jmeter/pull/165.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 #165


commit a5410bafd79b9d816f29e5105aabee789e61727a
Author: wangpeng 
Date:   2016-03-15T07:06:57Z

add JSON Assertion by using GSON

commit e4b32b82fe1e12c4ff7eb5618b307278004a1e34
Author: wangpeng 
Date:   2016-03-15T07:06:57Z

add JSON Assertion by using GSON

commit 5c4b3ab4f88b0282ca335205e2e2ee72966b4790
Author: wangpeng 
Date:   2016-03-15T07:20:09Z

add JSON Assertion by using GSON

commit 9fba8e2f7b7dfeea8e7d4c2d911b628928d33480
Author: wangpeng 
Date:   2016-03-15T08:13:00Z

add json assertion functions




---
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: Add JSON assertion by using GSON

2016-03-15 Thread buaawp
Github user buaawp closed the pull request at:

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


---
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.
---


Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread Vladimir Sitnikov
Antonio, sebb asked a link with full diff.
Here's the required link: https://github.com/apache/jmeter/pull/162/files

Unfortunately, the diff is hard to follow as the change reformats code.
Can you please avoid "full method reformat" and squash the PR into a
single commit?

Vladimir


[GitHub] jmeter pull request: Add JSON assertion by using GSON

2016-03-15 Thread buaawp
Github user buaawp commented on the pull request:

https://github.com/apache/jmeter/pull/165#issuecomment-196711294
  
Add JSON assertion


---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread vlsi
Github user vlsi commented on the pull request:

https://github.com/apache/jmeter/pull/162#issuecomment-196710977
  
>I don't have modify these lines.

@ra0077, can you please rework the PR without reformatting the whole method?


---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread vlsi
Github user vlsi commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/162#discussion_r56126978
  
--- Diff: src/components/org/apache/jmeter/config/CSVDataSet.java ---
@@ -146,71 +146,76 @@ public void setProperty(JMeterProperty property) {
 
 @Override
 public void iterationStart(LoopIterationEvent iterEvent) {
-FileServer server = FileServer.getFileServer();
-final JMeterContext context = getThreadContext();
-String delim = getDelimiter();
-if (delim.equals("\\t")) { // $NON-NLS-1$
-delim = "\t";// Make it easier to enter a Tab // $NON-NLS-1$
-} else if (delim.length()==0){
-log.warn("Empty delimiter converted to ','");
-delim=",";
-}
-if (vars == null) {
-String _fileName = getFilename();
-String mode = getShareMode();
-int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
-switch(modeInt){
-case CSVDataSetBeanInfo.SHARE_ALL:
-alias = _fileName;
-break;
-case CSVDataSetBeanInfo.SHARE_GROUP:
-alias = 
_fileName+"@"+System.identityHashCode(context.getThreadGroup());
-break;
-case CSVDataSetBeanInfo.SHARE_THREAD:
-alias = 
_fileName+"@"+System.identityHashCode(context.getThread());
-break;
-default:
-alias = _fileName+"@"+mode; // user-specified key
-break;
+String _fileName = getFilename();
+if (!_fileName.isEmpty()) {
+FileServer server = FileServer.getFileServer();
+final JMeterContext context = getThreadContext();
+String delim = getDelimiter();
+if (delim.equals("\\t")) { // $NON-NLS-1$
+delim = "\t";// Make it easier to enter a Tab // 
$NON-NLS-1$
+} else if (delim.length()==0){
+log.warn("Empty delimiter converted to ','");
+delim=",";
 }
-final String names = getVariableNames();
-if (names == null || names.length()==0) {
-String header = server.reserveFile(_fileName, 
getFileEncoding(), alias, true);
-try {
-vars = CSVSaveService.csvSplitString(header, 
delim.charAt(0));
-firstLineIsNames = true;
-} catch (IOException e) {
-log.warn("Could not split CSV header line",e);
+if (vars == null) {
+String mode = getShareMode();
+int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
+switch(modeInt){
+case CSVDataSetBeanInfo.SHARE_ALL:
+alias = _fileName;
+break;
+case CSVDataSetBeanInfo.SHARE_GROUP:
+alias = 
_fileName+"@"+System.identityHashCode(context.getThreadGroup());
+break;
+case CSVDataSetBeanInfo.SHARE_THREAD:
+alias = 
_fileName+"@"+System.identityHashCode(context.getThread());
+break;
+default:
+alias = _fileName+"@"+mode; // user-specified key
+break;
+}
+final String names = getVariableNames();
+if (names == null || names.length()==0) {
+String header = server.reserveFile(_fileName, 
getFileEncoding(), alias, true);
+try {
+vars = CSVSaveService.csvSplitString(header, 
delim.charAt(0));
+firstLineIsNames = true;
+} catch (IOException e) {
+log.warn("Could not split CSV header line",e);
+}
+} else {
+server.reserveFile(_fileName, getFileEncoding(), 
alias);
+vars = JOrphanUtils.split(names, ","); // $NON-NLS-1$
 }
-} else {
-server.reserveFile(_fileName, getFileEncoding(), alias);
-vars = JOrphanUtils.split(names, ","); // $NON-NLS-1$
-}
-}
-   
-// TODO: fetch this once as per vars above?
-JMeterVariables threadVars = context.getVariables();
-String[] lineValues = {};
-try {
-if (getQuotedData()) {
-lineValues = server.getParsedLine(alias, recy

Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread Antonio Gomes Rodrigues
Hi,

I don't have modify these lines.

But I think that CSV Data Set need more work to be ok

Antonio

2016-03-15 9:06 GMT+01:00 vlsi :

> Github user vlsi commented on a diff in the pull request:
>
> https://github.com/apache/jmeter/pull/162#discussion_r56126557
>
> --- Diff: src/components/org/apache/jmeter/config/CSVDataSet.java ---
> @@ -146,71 +146,76 @@ public void setProperty(JMeterProperty property)
> {
>
>  @Override
>  public void iterationStart(LoopIterationEvent iterEvent) {
> -FileServer server = FileServer.getFileServer();
> -final JMeterContext context = getThreadContext();
> -String delim = getDelimiter();
> -if (delim.equals("\\t")) { // $NON-NLS-1$
> -delim = "\t";// Make it easier to enter a Tab //
> $NON-NLS-1$
> -} else if (delim.length()==0){
> -log.warn("Empty delimiter converted to ','");
> -delim=",";
> -}
> -if (vars == null) {
> -String _fileName = getFilename();
> -String mode = getShareMode();
> -int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
> -switch(modeInt){
> -case CSVDataSetBeanInfo.SHARE_ALL:
> -alias = _fileName;
> -break;
> -case CSVDataSetBeanInfo.SHARE_GROUP:
> -alias =
> _fileName+"@"+System.identityHashCode(context.getThreadGroup());
> -break;
> -case CSVDataSetBeanInfo.SHARE_THREAD:
> -alias =
> _fileName+"@"+System.identityHashCode(context.getThread());
> -break;
> -default:
> -alias = _fileName+"@"+mode; // user-specified key
> -break;
> +String _fileName = getFilename();
> +if (!_fileName.isEmpty()) {
> +FileServer server = FileServer.getFileServer();
> +final JMeterContext context = getThreadContext();
> +String delim = getDelimiter();
> +if (delim.equals("\\t")) { // $NON-NLS-1$
> +delim = "\t";// Make it easier to enter a Tab //
> $NON-NLS-1$
> +} else if (delim.length()==0){
> +log.warn("Empty delimiter converted to ','");
> +delim=",";
>  }
> -final String names = getVariableNames();
> -if (names == null || names.length()==0) {
> -String header = server.reserveFile(_fileName,
> getFileEncoding(), alias, true);
> -try {
> -vars = CSVSaveService.csvSplitString(header,
> delim.charAt(0));
> -firstLineIsNames = true;
> -} catch (IOException e) {
> -log.warn("Could not split CSV header line",e);
> +if (vars == null) {
> +String mode = getShareMode();
> +int modeInt =
> CSVDataSetBeanInfo.getShareModeAsInt(mode);
> +switch(modeInt){
> +case CSVDataSetBeanInfo.SHARE_ALL:
> +alias = _fileName;
> +break;
> +case CSVDataSetBeanInfo.SHARE_GROUP:
> +alias =
> _fileName+"@"+System.identityHashCode(context.getThreadGroup());
> +break;
> +case CSVDataSetBeanInfo.SHARE_THREAD:
> +alias =
> _fileName+"@"+System.identityHashCode(context.getThread());
> --- End diff --
>
> Same for `..identityHashCode(context.getThread...`
>
>
> ---
> 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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread ra0077
Github user ra0077 commented on the pull request:

https://github.com/apache/jmeter/pull/162#issuecomment-196710362
  
Hi,

I don't have modify these lines.

But I think that CSV Data Set need more work to be ok

Antonio


---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread vlsi
Github user vlsi commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/162#discussion_r56126557
  
--- Diff: src/components/org/apache/jmeter/config/CSVDataSet.java ---
@@ -146,71 +146,76 @@ public void setProperty(JMeterProperty property) {
 
 @Override
 public void iterationStart(LoopIterationEvent iterEvent) {
-FileServer server = FileServer.getFileServer();
-final JMeterContext context = getThreadContext();
-String delim = getDelimiter();
-if (delim.equals("\\t")) { // $NON-NLS-1$
-delim = "\t";// Make it easier to enter a Tab // $NON-NLS-1$
-} else if (delim.length()==0){
-log.warn("Empty delimiter converted to ','");
-delim=",";
-}
-if (vars == null) {
-String _fileName = getFilename();
-String mode = getShareMode();
-int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
-switch(modeInt){
-case CSVDataSetBeanInfo.SHARE_ALL:
-alias = _fileName;
-break;
-case CSVDataSetBeanInfo.SHARE_GROUP:
-alias = 
_fileName+"@"+System.identityHashCode(context.getThreadGroup());
-break;
-case CSVDataSetBeanInfo.SHARE_THREAD:
-alias = 
_fileName+"@"+System.identityHashCode(context.getThread());
-break;
-default:
-alias = _fileName+"@"+mode; // user-specified key
-break;
+String _fileName = getFilename();
+if (!_fileName.isEmpty()) {
+FileServer server = FileServer.getFileServer();
+final JMeterContext context = getThreadContext();
+String delim = getDelimiter();
+if (delim.equals("\\t")) { // $NON-NLS-1$
+delim = "\t";// Make it easier to enter a Tab // 
$NON-NLS-1$
+} else if (delim.length()==0){
+log.warn("Empty delimiter converted to ','");
+delim=",";
 }
-final String names = getVariableNames();
-if (names == null || names.length()==0) {
-String header = server.reserveFile(_fileName, 
getFileEncoding(), alias, true);
-try {
-vars = CSVSaveService.csvSplitString(header, 
delim.charAt(0));
-firstLineIsNames = true;
-} catch (IOException e) {
-log.warn("Could not split CSV header line",e);
+if (vars == null) {
+String mode = getShareMode();
+int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
+switch(modeInt){
+case CSVDataSetBeanInfo.SHARE_ALL:
+alias = _fileName;
+break;
+case CSVDataSetBeanInfo.SHARE_GROUP:
+alias = 
_fileName+"@"+System.identityHashCode(context.getThreadGroup());
+break;
+case CSVDataSetBeanInfo.SHARE_THREAD:
+alias = 
_fileName+"@"+System.identityHashCode(context.getThread());
--- End diff --

Same for `..identityHashCode(context.getThread...`


---
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: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread vlsi
Github user vlsi commented on a diff in the pull request:

https://github.com/apache/jmeter/pull/162#discussion_r56126539
  
--- Diff: src/components/org/apache/jmeter/config/CSVDataSet.java ---
@@ -146,71 +146,76 @@ public void setProperty(JMeterProperty property) {
 
 @Override
 public void iterationStart(LoopIterationEvent iterEvent) {
-FileServer server = FileServer.getFileServer();
-final JMeterContext context = getThreadContext();
-String delim = getDelimiter();
-if (delim.equals("\\t")) { // $NON-NLS-1$
-delim = "\t";// Make it easier to enter a Tab // $NON-NLS-1$
-} else if (delim.length()==0){
-log.warn("Empty delimiter converted to ','");
-delim=",";
-}
-if (vars == null) {
-String _fileName = getFilename();
-String mode = getShareMode();
-int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
-switch(modeInt){
-case CSVDataSetBeanInfo.SHARE_ALL:
-alias = _fileName;
-break;
-case CSVDataSetBeanInfo.SHARE_GROUP:
-alias = 
_fileName+"@"+System.identityHashCode(context.getThreadGroup());
-break;
-case CSVDataSetBeanInfo.SHARE_THREAD:
-alias = 
_fileName+"@"+System.identityHashCode(context.getThread());
-break;
-default:
-alias = _fileName+"@"+mode; // user-specified key
-break;
+String _fileName = getFilename();
+if (!_fileName.isEmpty()) {
+FileServer server = FileServer.getFileServer();
+final JMeterContext context = getThreadContext();
+String delim = getDelimiter();
+if (delim.equals("\\t")) { // $NON-NLS-1$
+delim = "\t";// Make it easier to enter a Tab // 
$NON-NLS-1$
+} else if (delim.length()==0){
+log.warn("Empty delimiter converted to ','");
+delim=",";
 }
-final String names = getVariableNames();
-if (names == null || names.length()==0) {
-String header = server.reserveFile(_fileName, 
getFileEncoding(), alias, true);
-try {
-vars = CSVSaveService.csvSplitString(header, 
delim.charAt(0));
-firstLineIsNames = true;
-} catch (IOException e) {
-log.warn("Could not split CSV header line",e);
+if (vars == null) {
+String mode = getShareMode();
+int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
+switch(modeInt){
+case CSVDataSetBeanInfo.SHARE_ALL:
+alias = _fileName;
+break;
+case CSVDataSetBeanInfo.SHARE_GROUP:
+alias = 
_fileName+"@"+System.identityHashCode(context.getThreadGroup());
--- End diff --

Do you assume "all the thread groups would get unique hash codes". I'm 
afraid that would not work.


---
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.
---


Re: Bug 59171 - sort order for Sample Result config dialog

2016-03-15 Thread Philippe Mouawad
On Tue, Mar 15, 2016 at 1:31 AM, sebb  wrote:

> On 14 March 2016 at 22:32, Philippe Mouawad 
> wrote:
> > from user point of view, a user does not  know attribute names,
>
> But they won't necessarily know the exact name for each attribute
> either, and the order depends on the exact name.
> They are hopefully reasonably common names for the values, but there's
> no standard for the names.
> [Unlike say the names of countries or languages.]
>
>
If I take the french example, alphabetical order seems the best option.
As attribute names are not known, documentation references english labels.

An alternative option is to always use the English (documentation) sort
order , this way people can refer to it in other languages and select the
options.


>
> > So I
> > suppose the best presentation is probably an alphabetical sort , this is
> > how I usually proceed in the Ux is use.
>
> But the problem is that it is Locale-specific.
>
> Further, if we change the translation of any attribute, the order may
> change.
>
> Whereas if we sort by attribute name, the order is fixed across
> languages, and people can get used to where they are.
>
> > On Monday, March 14, 2016, sebb  wrote:
> >
> >> Are there any other opinions on this?
> >>
> >> Only Philippe has commented that he prefers ordering by Locale-specific
> >> text.
> >>
> >> I would prefer ordering by attribute name, as that does not vary when
> >> switching languages.
> >> It's also not very different in the English version (probably because
> >> the attribute names are in English)
> >>
> >> So it's not clear what the order should be.
> >>
> >> Comments please.
> >>
> >
> >
> > --
> > Cordialement.
> > Philippe Mouawad.
>



-- 
Cordialement.
Philippe Mouawad.


Re: [GitHub] jmeter pull request: bug59153_ExceptionInCSVDataSetWithEmptyFilena...

2016-03-15 Thread Antonio Gomes Rodrigues
Hi Sebb,

Is it more clear and do you want I make a new PR?

Antonio

2016-03-13 21:40 GMT+01:00 Antonio Gomes Rodrigues :

> Hi Sebb,
>
> I have made a git diff
>
> diff --git a/src/components/org/apache/jmeter/config/CSVDataSet.java
> b/src/components/org/apache/jmeter/config/CSVDataSet.java
> index 65c20b6..a702868 100644
> --- a/src/components/org/apache/jmeter/config/CSVDataSet.java
> +++ b/src/components/org/apache/jmeter/config/CSVDataSet.java
> @@ -146,71 +146,76 @@ public class CSVDataSet extends ConfigTestElement
>
>  @Override
>  public void iterationStart(LoopIterationEvent iterEvent) {
> -FileServer server = FileServer.getFileServer();
> -final JMeterContext context = getThreadContext();
> -String delim = getDelimiter();
> -if (delim.equals("\\t")) { // $NON-NLS-1$
> -delim = "\t";// Make it easier to enter a Tab // $NON-NLS-1$
> -} else if (delim.length()==0){
> -log.warn("Empty delimiter converted to ','");
> -delim=",";
> -}
> -if (vars == null) {
> -String _fileName = getFilename();
> -String mode = getShareMode();
> -int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
> -switch(modeInt){
> -case CSVDataSetBeanInfo.SHARE_ALL:
> -alias = _fileName;
> -break;
> -case CSVDataSetBeanInfo.SHARE_GROUP:
> -alias =
> _fileName+"@"+System.identityHashCode(context.getThreadGroup());
> -break;
> -case CSVDataSetBeanInfo.SHARE_THREAD:
> -alias =
> _fileName+"@"+System.identityHashCode(context.getThread());
> -break;
> -default:
> -alias = _fileName+"@"+mode; // user-specified key
> -break;
> +String _fileName = getFilename();
> +if (!_fileName.isEmpty()) {
> +FileServer server = FileServer.getFileServer();
> +final JMeterContext context = getThreadContext();
> +String delim = getDelimiter();
> +if (delim.equals("\\t")) { // $NON-NLS-1$
> +delim = "\t";// Make it easier to enter a Tab //
> $NON-NLS-1$
> +} else if (delim.length()==0){
> +log.warn("Empty delimiter converted to ','");
> +delim=",";
>  }
> -final String names = getVariableNames();
> -if (names == null || names.length()==0) {
> -String header = server.reserveFile(_fileName,
> getFileEncoding(), alias, true);
> -try {
> -vars = CSVSaveService.csvSplitString(header,
> delim.charAt(0));
> -firstLineIsNames = true;
> -} catch (IOException e) {
> -log.warn("Could not split CSV header line",e);
> +if (vars == null) {
> +String mode = getShareMode();
> +int modeInt = CSVDataSetBeanInfo.getShareModeAsInt(mode);
> +switch(modeInt){
> +case CSVDataSetBeanInfo.SHARE_ALL:
> +alias = _fileName;
> +break;
> +case CSVDataSetBeanInfo.SHARE_GROUP:
> +alias =
> _fileName+"@"+System.identityHashCode(context.getThreadGroup());
> +break;
> +case CSVDataSetBeanInfo.SHARE_THREAD:
> +alias =
> _fileName+"@"+System.identityHashCode(context.getThread());
> +break;
> +default:
> +alias = _fileName+"@"+mode; // user-specified key
> +break;
> +}
> +final String names = getVariableNames();
> +if (names == null || names.length()==0) {
> +String header = server.reserveFile(_fileName,
> getFileEncoding(), alias, true);
> +try {
> +vars = CSVSaveService.csvSplitString(header,
> delim.charAt(0));
> +firstLineIsNames = true;
> +} catch (IOException e) {
> +log.warn("Could not split CSV header line",e);
> +}
> +} else {
> +server.reserveFile(_fileName, getFileEncoding(),
> alias);
> +vars = JOrphanUtils.split(names, ","); // $NON-NLS-1$
>  }
> -} else {
> -server.reserveFile(_fileName, getFileEncoding(), alias);
> -vars = JOrphanUtils.split(names, ","); // $NON-NLS-1$
> -}
> -}
> -
> -// TODO: fetch this once as per vars above?
> -JMeterVariables threadVars = context.getVariables();
> -String[] lineValues = {};
> -try {
> -if (getQuotedData()) 

[GitHub] jmeter pull request: Add JSON assertion by using GSON

2016-03-15 Thread buaawp
GitHub user buaawp opened a pull request:

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

Add JSON assertion by using GSON



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

$ git pull https://github.com/buaawp/jmeter trunk

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

https://github.com/apache/jmeter/pull/165.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 #165


commit a5410bafd79b9d816f29e5105aabee789e61727a
Author: wangpeng 
Date:   2016-03-15T07:06:57Z

add JSON Assertion by using GSON

commit e4b32b82fe1e12c4ff7eb5618b307278004a1e34
Author: wangpeng 
Date:   2016-03-15T07:06:57Z

add JSON Assertion by using GSON

commit 5c4b3ab4f88b0282ca335205e2e2ee72966b4790
Author: wangpeng 
Date:   2016-03-15T07:20:09Z

add JSON Assertion by using GSON




---
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.
---