when the same client connects to different page, session doesn't keep.

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • None
    • Affects Version/s: 1.0.0
    • Component/s: Mimic
    • None

      whne the same client connects to different page, session doesn't keep. Add the following test case can reproduce this problem.

      	@Test
      	public void testSameSession(){
      		DefaultZatsEnvironment ctx = new DefaultZatsEnvironment();
      		try{
      			ctx.init("./src/test/resources/web");
      			Client c =  ctx.newClient();
      			DesktopAgent desktop1 = c.connect("/basic/click.zul");
      			DesktopAgent desktop2 = c.connect("/basic/click.zul");
      			assertNotSame(desktop1.getId(), desktop2.getId());
      			assertEquals(((HttpSession)((Desktop)desktop1.getDelegatee()).getSession().getNativeSession()).getId(),
      					((HttpSession)((Desktop)desktop2.getDelegatee()).getSession().getNativeSession()).getId());
      		}finally{
      			ctx.destroy();
      		}
      	}	
      

      cause:
      EmulatorClient.connect() doesn't append cookie.

            Assignee:
            paowang
            Reporter:
            hawk
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: