#782 Chatroom is not auto opened when receiving a message

13.3.29
closed-wont-fix
nobody
5
2014-04-10
2012-12-09
Anonymous
No

On 88b8bc9c67c2718228032bf5ffca0e79622c7b2c (current gerrit master) the STF-Test de.fu_berlin.inf.dpp.stf.test.stf.chatview.ChatViewTest.testMultipleOpenedChatRooms() fails on second run.

To reproduce the behauvior perform the following tasks:
- Launch Saros_STF_Alice and Saros_STF_Bob
- Run JUnit-Plugin-Test de.fu_berlin.inf.dpp.stf.test.stf.chatview.ChatViewTest
- Connect Alice and Bob to Saros-XMPP (they are disconnected after the first run; in that state the second run won't start)
- Run JUnit-Plugin-Test de.fu_berlin.inf.dpp.stf.test.stf.chatview.ChatViewTest
You will see de.fu_berlin.inf.dpp.stf.test.stf.chatview.ChatViewTest.testMultipleOpenedChatRooms() fail in line 130
"String lastSUCLine = BOB.superBot().views().sarosView().selectChatroomWithRegex(ALICE.getBaseJid() + ".*")"

org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException: Could not find widget.
at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetAppears(SWTBotFactory.java:348)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.widget(SWTBotFactory.java:297)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.widget(SWTBotFactory.java:286)
at de.fu_berlin.inf.dpp.stf.server.rmi.superbot.component.view.saros.impl.SarosView.selectChatroomWithRegex(SarosView.java:435)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:160)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:194)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:148)
at $Proxy27.selectChatroomWithRegex(Unknown Source)
at de.fu_berlin.inf.dpp.stf.test.stf.chatview.ChatViewTest.testMultipleOpenedChatRooms(ChatViewTest.java:130)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:53)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.pde.internal.junit.runtime.RemotePluginTestRunner.main(RemotePluginTestRunner.java:62)
at org.eclipse.pde.internal.junit.runtime.PlatformUITestHarness$1.run(PlatformUITestHarness.java:47)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3537)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3189)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.runApp(NonUIThreadTestApplication.java:54)
at org.eclipse.pde.internal.junit.runtime.UITestApplication.runApp(UITestApplication.java:41)
at org.eclipse.pde.internal.junit.runtime.NonUIThreadTestApplication.start(NonUIThreadTestApplication.java:48)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
at org.eclipse.equinox.launcher.Main.main(Main.java:1414)
Caused by: org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 5000 ms.: Could not find widget matching: (of type 'CTabItem' and with regex '<([
]|.)*atemp@saros-con.imp.fu-berlin.de.*([
]|.)*>')
at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:398)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:372)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:360)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntilWidgetAppears(SWTBotFactory.java:346)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.widget(SWTBotFactory.java:297)
at org.eclipse.swtbot.swt.finder.SWTBotFactory.widget(SWTBotFactory.java:286)
at de.fu_berlin.inf.dpp.stf.server.rmi.superbot.component.view.saros.impl.SarosView.selectChatroomWithRegex(SarosView.java:435)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)

Is anyone able to reproduce this?

I'm facing the same behauvior in a test I've written for gerrit #440 (Patch Set 2) in de.fu_berlin.inf.dpp.stf.test.chatview.ChatViewFunctionsTest.testVisualChatNotification() which passes on the first run as well and fails then on the second one.

Discussion

  • Stefan Rossbach

    Stefan Rossbach - 2012-12-10
    • summary: testMultipleOpenedChatRooms() fails on second run --> Chatroom is not auto opened when receiving a message
     
  • Stefan Rossbach

    Stefan Rossbach - 2012-12-10

    You are not alone :P

    I encountered this bug when I had written self tests for the STF.

    The problem I currently have that I can only reproduce this bug with the STF but not manually.

    What happens is:
    INFO 13:34:51,679 [Smack Listener Processor (5)] (SingleUserChatService.java:84) chat created between jenkins_bob_stf@saros-con.imp.fu-berlin.de/Saros <->jenkins_alice_stf@saros-con.imp.fu-berlin.de/Saros, created local: false
    INFO 13:34:51,679 [Smack Listener Processor (5)] (SingleUserChatService.java:107) skipping notification of listeners because the chat already exists
    INFO 13:35:20,694 [Smack Listener Processor (5)] (SingleUserChatService.java:84) chat created between jenkins_bob_stf@saros-con.imp.fu-berlin.de/Saros <->jenkins_alice_stf@saros-con.imp.fu-berlin.de/Saros, created local: false
    INFO 13:35:20,694 [Smack Listener Processor (5)] (SingleUserChatService.java:107) skipping notification of listeners because the chat already exists
    INFO 13:38:15,074 [Smack Listener Processor (5)] (SingleUserChatService.java:84) chat created between jenkins_bob_stf@saros-con.imp.fu-berlin.de/Saros <->jenkins_alice_stf@saros-con.imp.fu-berlin.de/Saros, created local: false
    INFO 13:38:15,074 [Smack Listener Processor (5)] (SingleUserChatService.java:107) skipping notification of listeners because the chat already exists

    For an unknown reason the chat listener itself does not process the message and so the GUI is not notified that it should reopen the window.

     
  • Stefan Rossbach

    Stefan Rossbach - 2012-12-10
    • labels: 1155557 --> Communication
     
  • Conrad Läßig

    Conrad Läßig - 2013-09-02
    • status: open --> closed-fixed
    • Group: --> 12.7.27.DEVEL
     
  • Conrad Läßig

    Conrad Läßig - 2013-09-02

    This one was fixed in commit a0c1467e2d67a9b5522701602a44d822ba346757.

     
  • Stefan Rossbach

    Stefan Rossbach - 2013-09-02

    There are still some issues (with the GUI installing the listener)

    Start 1 Eclipse session, send something to an offline user.
    Start a new Eclipse instance with the user you just send the message to(make sure you have autoconnect enabled). The user is not notified about the new message. If you open a new chat to the user you used to send the message you will that the message you had sent is in the chat view.

     
  • Stefan Rossbach

    Stefan Rossbach - 2013-09-02
    • status: closed-fixed --> open
    • Group: 12.7.27.DEVEL --> 13.3.29
     
  • Franz Zieris

    Franz Zieris - 2014-04-10
    • status: open --> closed-wont-fix
     
  • Franz Zieris

    Franz Zieris - 2014-04-10

    There was a "hack" in commit 0598ae4 which is good enough for the vast majority of our users.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks