Skip to main content



      Home
Home » Eclipse Projects » NatTable » SWTBot and Nattable: wait until all pending updates are performed
SWTBot and Nattable: wait until all pending updates are performed [message #1817380] Thu, 21 November 2019 07:52 Go to next message
Eclipse UserFriend
We are testing our Nattable with SWTBot.
This works all good, but in rare cases the test fails.

Presumably, it is some timing related issue.
This is what we do:
1. Change the underlying data
2. Almost immediately check the content of the Nattable

Is there any way to wait for pending Nattable update activity?
Re: SWTBot and Nattable: wait until all pending updates are performed [message #1817383 is a reply to message #1817380] Thu, 21 November 2019 08:09 Go to previous messageGo to next message
Eclipse UserFriend
It depends on what you mean by "Change the underlying data". How do you change the data? Directly on the backing data or via N UpdateDataCommand?
Re: SWTBot and Nattable: wait until all pending updates are performed [message #1817384 is a reply to message #1817383] Thu, 21 November 2019 08:46 Go to previous messageGo to next message
Eclipse UserFriend
Okay - I had a look in our code and probably found the problem: the Nattable is updated by calling nattable.refresh(). This is triggered by an asynchronous e4 event once the data is modified.

So I guess the nattable.refresh() blocks as long as the changes are taking place, correct? In that case we need to handle this somehow different.
Re: SWTBot and Nattable: wait until all pending updates are performed [message #1817385 is a reply to message #1817384] Thu, 21 November 2019 08:48 Go to previous messageGo to next message
Eclipse UserFriend
You didn't answer my question so I don't know what to answer.
Re: SWTBot and Nattable: wait until all pending updates are performed [message #1817386 is a reply to message #1817385] Thu, 21 November 2019 08:55 Go to previous messageGo to next message
Eclipse UserFriend
Yeah, sorry ;). The data is changed directly.
Re: SWTBot and Nattable: wait until all pending updates are performed [message #1817387 is a reply to message #1817385] Thu, 21 November 2019 08:55 Go to previous message
Eclipse UserFriend
Quote:
So I guess the nattable.refresh() blocks as long as the changes are taking place, correct?


No I don't think so. How should refresh() know how long to wait? It triggers an event that is fired the stack upwards and triggers cache clearing. If the event has not yet reached the NatTable instance you access cached states.
Previous Topic:List view is not updated while filtering
Next Topic:background image not showing in column header
Goto Forum:
  


Current Time: Wed May 14 17:30:50 EDT 2025

Powered by FUDForum. Page generated in 0.05541 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top