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 38 public class ScopedSetAttributeTestCase 39 extends ScopedTestCase 40 { 41 42 public ScopedSetAttributeTestCase(String name) 43 { 44 super(name); 45 warName_ = "/http-scoped-set-attr/"; 46 47 concatenate(); 48 } 49 50 protected String getWarName() 51 { 52 return "http-scoped-set-attr"; 53 } 54 55 public static Test suite() throws Exception 56 { 57 Test t1 = JBossClusteredTestCase.getDeploySetup(ScopedSetAttributeTestCase.class, 58 "http-scoped-set-attr.war"); 59 return t1; 60 } 61 62 63 68 public void testNonPrimitiveModify() 69 throws Exception 70 { 71 String attr = ""; 72 getLog().debug("Enter testNonPrimitiveModify"); 73 74 getLog().debug(setUrl + ":::::::" + getUrl); 75 76 HttpClient client = new HttpClient(); 78 79 makeGet(client, baseURL0_ +setUrl); 81 82 String attrOld = makeGet(client, baseURL0_ +getUrl); 84 85 makeGet(client, baseURL0_ +modifyNoSetUrl); 87 88 attr = makeGet(client, baseURL0_ +getUrl); 90 91 sleepThread(DEFAULT_SLEEP); 92 93 setCookieDomainToThisServer(client, servers_[1]); 95 String attr2 = makeGet(client, baseURL1_ +getUrl); 96 97 assertEquals("Attributes should be the same", attrOld, attr2); 99 getLog().debug("Exit testNonPrimitiveModify"); 100 } 101 102 103 } 104 | Popular Tags |