01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.apache.wicket.threadtest;
18:
19: import java.util.Arrays;
20: import java.util.List;
21:
22: import org.apache.commons.logging.Log;
23: import org.apache.commons.logging.LogFactory;
24: import org.apache.wicket.threadtest.tester.SimpleGetCommand;
25: import org.apache.wicket.threadtest.tester.Tester;
26:
27: /**
28: * @author eelcohillenius
29: */
30: public class App2Test1 {
31:
32: private static final Log log = LogFactory.getLog(App2Test1.class);
33:
34: /**
35: * @param args
36: * @throws Exception
37: */
38: public static void main(String[] args) throws Exception {
39:
40: List<String> gets = Arrays
41: .asList(new String[] { "/app2?wicket:bookmarkablePage=one:org.apache.wicket.threadtest.apps.app2.Home" });
42:
43: SimpleGetCommand getCmd = new SimpleGetCommand(gets, 5);
44:
45: // getCmd.setPrintResponse(true);
46:
47: // AS OF OCTOBER 9 2006, THIS TYPICALLY RESULTS IN A DEADLOCK
48: // FIXED now... keep this test
49: Tester tester = new Tester(getCmd, 50, false);
50:
51: // new Tester(.., .., false) would not give a deadlock, as then
52: // all threads point to seperate sessions
53:
54: tester.run();
55: }
56: }
|