Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 12:52 Go to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
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 13:09 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
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 13:46 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
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 13:48 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
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 13:55 Go to previous messageGo to next message
Robert Schulk is currently offline Robert SchulkFriend
Messages: 144
Registered: July 2015
Senior Member
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 13:55 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
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: Thu Mar 28 20:09:17 GMT 2024

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

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

Back to the top