A problem about file distribution
Mavlarn Tuohuti <[email protected]> Tue, 21 Feb 2012 16:32:05 +0800
| Newsgroups | gmane.comp.java.grinder.devel |
|---|---|
| Message-ID | <CAEU7BFLf4_gHfztP0Smx7T+Mkdj+R3kmYDPBq=wp3OAYxHPrkg@mail.gmail.com> |
We have a system using Grinder to test. We wrapped the controller to run in
a web application.
Now I met a problem, every time I use a new directory
as distribution directory, then the files can not be distributed to agent
side. But, if I use one directory and modify the properties, then there is
no problem.
In my test, I have 2 directories, test1 and test2, and I switch between
these 2 dir and test continuously. But the file will never be distributed
to agent.
some part of the code is as below:
String filePath; //it is the dir I want to set
final ConsoleProperties properties =
(ConsoleProperties)container.getComponentInstanceOfType(ConsoleProperties.class);
Directory directory = new Directory(new File(filePath));
properties.setAndSaveDistributionDirectory(directory);
final FileDistribution distribution =
(FileDistribution)
container.getComponentInstanceOfType(FileDistributionImplementation.class);
final FileDistributionHandler distributionHandler = distribution
.getHandler();
try {
while (true) {
FileDistributionHandler.Result result;
result = distributionHandler.sendNextFile();
if (result == null) {
break;
}
LOG.debug("Success in distributing {}", result.getFileName());
}
} catch (FileContentsException e) {
LOG.error(e.getMessage(), e);
throw new NGrinderRuntimeException(e.getMessage(), e);
}
>From controller side, I can see that the log "Success in
distributing ....". It means the files are scanned properly and sent to
agent. But there is no response on agent side.
Thanks.
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Grinder-development mailing list
Grinder-development-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/grinder-development