Jason,

Thanks for bringing this question up. You are right, we haven't thought of
the parallel execution in Tellurium Core yet. We will reproduce your problem
and see if we can have a quick fix.

More important concerns may include the singleton pattern we used in
Tellurium
core. Perhaps we should consider both singleton and prototype objects like
Spring
bean or Google Guice does. We need to think about this more deeply.

Thanks again,

Jian

On Tue, Mar 16, 2010 at 9:45 PM, Jason <[email protected]> wrote:

> Oops, I realize this test needs thread synchronization ( so that the
> connectUrl() and asserts are done in a synchronized block), but for
> now, just note that you'll get the selenium error:
>
> com.thoughtworks.selenium.SeleniumException:
> The_server_localhost_failed_to_respond_with_a_valid_HTTP_response
>
> instead of just assertion failures...
>
>
>
> On Mar 16, 6:41 pm, Jason <[email protected]> wrote:
> > OK, I think this demonstrates the issue.  There are 2 parts -- one is
> > the suite file, the other is the test.
> >
> > Test first:
> >
> > import org.tellurium.test.groovy.*;
> >
> > import org.testng.annotations.*;
> > import static org.testng.AssertJUnit.*;
> > import org.tellurium.dsl.DslContext;
> >
> > public class UltraSimpleParallelTest extends
> > TelluriumGroovyTestNGTestCase {
> >
> >     public void initUi() { }
> >
> >     @Test
> >     public void testOne() {
> >         1.upto(10) {
> >             connectUrl("http://google.com";);
> >             assertEquals("location should be google", "
> http://www.google.com/";, connector.sel.getProperty("location"));
> >             sleep(500)
> >         }
> >     }
> >
> >     @Test
> >     public void testTwo() {
> >         1.upto(10) {
> >             connectUrl("http://amazon.com";);
> >             assertEquals("location should be amazon", "
> http://www.amazon.com/";, connector.sel.getProperty("location"));
> >             sleep(500)
> >         }
> >     }
> >
> > }
> >
> > suite file:
> >
> > <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd";>
> > <suite thread-count="2" skipfailedinvocationCounts="false" verbose="1"
> > name="parallel_test" junit="false" parallel="methods"
> > annotations="JDK" data-provider-thread-count="2">
> >   <test name="parallel_test" junit="false" parallel="methods"
> > annotations="JDK">
> >     <classes>
> >       <class name="UltraSimpleParallelTest">
> >         <methods>
> >           <include name="testOne"/>
> >           <include name="testTwo"/>
> >         </methods>
> >       </class>
> >     </classes>
> >   </test>
> > </suite>
>
> --
> You received this message because you are subscribed to the Google Groups
> "tellurium-users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<tellurium-users%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/tellurium-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tellurium-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tellurium-users?hl=en.

Reply via email to