1 22 package org.jboss.test.cluster.test; 23 24 import junit.framework.Test; 25 import org.apache.commons.httpclient.HttpClient; 26 import org.apache.commons.httpclient.HttpMethod; 27 import org.apache.commons.httpclient.methods.GetMethod; 28 import org.jboss.test.JBossClusteredTestCase; 29 30 37 public class ScopedSetTriggerTestCase 38 extends ScopedTestCase 39 { 40 41 public ScopedSetTriggerTestCase(String name) 42 { 43 super(name); 44 warName_ = "/http-scoped-set/"; 45 46 concatenate(); 47 } 48 49 protected String getWarName() 50 { 51 return "http-scoped-set"; 52 } 53 54 public static Test suite() throws Exception 55 { 56 Test t1 = JBossClusteredTestCase.getDeploySetup(ScopedSetTriggerTestCase.class, 57 "http-scoped-set.war"); 58 return t1; 59 } 60 61 62 67 public void testNonPrimitiveModify() 68 throws Exception 69 { 70 String attr = ""; 71 getLog().debug("Enter testNonPrimitiveModify"); 72 73 getLog().debug(setUrl + ":::::::" + getUrl); 74 75 HttpClient client = new HttpClient(); 77 78 makeGet(client, baseURL0_ +setUrl); 80 81 HttpMethod method = new GetMethod(getUrl); 83 String attrOld = makeGet(client, baseURL0_ +getUrl); 85 86 makeGet(client, baseURL0_ +modifyNoSetUrl); 88 89 attr = makeGet(client, baseURL0_ +getUrl); 91 92 sleepThread(DEFAULT_SLEEP); 93 94 setCookieDomainToThisServer(client, servers_[1]); 96 String attr2 = makeGet(client, baseURL1_ +getUrl); 97 98 assertEquals("Attributes should be the same", attrOld, attr2); 100 getLog().debug("Exit testNonPrimitiveModify"); 101 } 102 103 104 } 105 | Popular Tags |