Re: Improper Properties file directory during starting test
Philip Aston <[email protected]> Sun, 01 Apr 2012 14:40:51 +0100
| Newsgroups | gmane.comp.java.grinder.devel |
|---|---|
| Message-ID | <[email protected]> |
The problem is that the properties sent to the agent should contain a
relative path, not an absolute path. I think this could be coded more
defensively, but right now it relies on the relative path being
calculated by the ConsoleUI class - see
http://grinder.git.sourceforge.net/git/gitweb.cgi?p=grinder/grinder;a=blob;f=grinder-core/src/main/java/net/grinder/console/swingui/ConsoleUI.java;h=d92e53a0fa291a4b8a451158b812241ce3de9674;hb=HEAD#l1361
Is your properties file contained within your console distribution
directory?
- Phil
On 27/03/12 13:24, Mavlarn Tuohuti wrote:
> I am using 3.7.1, and during starting a test, I got an error message
> from agent:
> 20:05:07.939 [Thread-36] ERROR agent - The script file
> 'home/grinder/grinder_console/project/m_test/script/test.py' does not
> exist or is not readable.
>
> And, after debug, I found that, in AgentImplementation.run() method,
> about line 190,
>
> if (startMessage != null) {
> final GrinderProperties messageProperties =
> startMessage.getProperties();
> final Directory fileStoreDirectory =
> m_fileStore.getDirectory();
>
> // Convert relative path to absolute path.
> * messageProperties.setAssociatedFile(*
> * fileStoreDirectory.getFile(*
> * messageProperties.getAssociatedFile()));*
>
> final File consoleScript =
> messageProperties.resolveRelativeFile(
> messageProperties.getFile(GrinderProperties.SCRIPT,
>
> GrinderProperties.DEFAULT_SCRIPT));
>
> after executing this part, the associated file of *messageProperties* is:
> /home/grinder/agent/*home/grinder/grinder_console/project/m_test/script/*grinder.properties
>
> At the beginning, the *messageProperties* is got from console, this
> function *messageProperties.getAssociatedFile()* will get a file whose
> path is from console side, that is
> "/*home/grinder/grinder_console/project/m_test/script/*grinder.properties".
>
> After it get from file store, and set associated file again, the file
> became to:
> "/home/grinder/agent/XXXfile-store/current/*home/grinder/grinder_console/project/m_test/script/*grinder.properties"
>
> It just adds console side file path to agent 's file store. Then, at
> last, it didn't find the script file and caused the error in agent as
> above.
>
> Is that a bug? Or I made some mistake?
>
>
> ------------------------------------------------------------------------------
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here
> http://p.sf.net/sfu/sfd2d-msazure
>
>
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Grinder-development mailing list
Grinder-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/grinder-development