|
Lines 24-29
Link Here
|
| 24 |
import junit.framework.TestCase; |
24 |
import junit.framework.TestCase; |
| 25 |
|
25 |
|
| 26 |
import org.eclipse.rap.rwt.testfixture.Fixture; |
26 |
import org.eclipse.rap.rwt.testfixture.Fixture; |
|
|
27 |
import org.eclipse.rap.rwt.testfixture.TestRequest; |
| 28 |
import org.eclipse.rap.rwt.testfixture.TestResponse; |
| 27 |
import org.eclipse.rwt.internal.application.RWTFactory; |
29 |
import org.eclipse.rwt.internal.application.RWTFactory; |
| 28 |
import org.eclipse.rwt.internal.lifecycle.*; |
30 |
import org.eclipse.rwt.internal.lifecycle.*; |
| 29 |
import org.eclipse.rwt.service.IServiceHandler; |
31 |
import org.eclipse.rwt.service.IServiceHandler; |
|
Lines 139-144
Link Here
|
| 139 |
|
141 |
|
| 140 |
verify( fakeWriter ).finish(); |
142 |
verify( fakeWriter ).finish(); |
| 141 |
} |
143 |
} |
|
|
144 |
|
| 145 |
public void testConcurrentlyResterSession() throws InterruptedException { |
| 146 |
final HttpSession session = ContextProvider.getSession().getHttpSession(); |
| 147 |
final Throwable[] exception = { null }; |
| 148 |
Runnable runnable = new Runnable() { |
| 149 |
public void run() { |
| 150 |
try { |
| 151 |
TestRequest request = new TestRequest(); |
| 152 |
request.setSession( session ); |
| 153 |
Fixture.createServiceContext( new TestResponse(), request ); |
| 154 |
LifeCycleServiceHandler.clearSessionStore(); |
| 155 |
} catch( Exception e ) { |
| 156 |
e.printStackTrace(); |
| 157 |
exception[ 0 ] = e; |
| 158 |
} |
| 159 |
} |
| 160 |
}; |
| 161 |
|
| 162 |
Thread[] threads = Fixture.startThreads( 200, runnable ); |
| 163 |
Fixture.joinThreads( threads ); |
| 164 |
|
| 165 |
assertNull( exception[ 0 ] ); |
| 166 |
} |
| 142 |
|
167 |
|
| 143 |
protected void setUp() { |
168 |
protected void setUp() { |
| 144 |
Fixture.setUp(); |
169 |
Fixture.setUp(); |