This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 241240 - Loosing test results for one platform
Summary: Loosing test results for one platform
Status: RESOLVED WORKSFORME
Alias: None
Product: qa
Classification: Unclassified
Component: Synergy (show other bugs)
Version: 8.0
Hardware: PC Linux
: P1 normal (vote)
Assignee: Vladimir Riha
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-31 17:00 UTC by Jiri Kovalsky
Modified: 2014-02-04 08:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Kovalsky 2014-01-31 17:00:31 UTC
In NetBeans IDE 8.0 Full Testing - NetBeans QE [1] I successfully completed testing of Ant Debugger [2] on Ubuntu. Then I tested on Mac OS X, paused it at ~50%, filed bug, continued with the test and finished it with 1 failed test case. Finally I did exactly the same on Windows. After the test result from the last test were saved Synergy claims that completion on Mac OS X is 0%! Does it mean that all results from the Mac OS X testing are gone? I hope not.

Can you please Lado take a look at this showstopper? Thanks a lot!

[1] http://services.netbeans.org/synergy/client/app/#/run/7
[2] http://services.netbeans.org/synergy/client/app/#/specification/228
Comment 1 Vladimir Riha 2014-01-31 19:06:55 UTC
The assignment has been last updated at

2014-01-31 15:40:12 UTC

and from what it looks like, I'd say it has been restarted at this time, there are no errors in log. Is it possible you have e.g. reopened tab in browser (or browser as such) with this assignment left open from some previous time/session?  All timestamps for these 3 assignments are

Mac 
lastUpdated: "31 Jan 2014 15:40:12 UTC"
started: "30 Jan 2014 16:07:48 UTC

Ubuntu
lastUpdated: "29 Jan 2014 13:33:50 UTC"
started: "29 Jan 2014 12:55:11 UTC"


Windows
lastUpdated: "31 Jan 2014 16:51:34 UTC"
started: "31 Jan 2014 16:31:44 UTC"

where "started" is the very first time you press Start or Restart. No timestamp correlates with the lastUpdated on Mac, so don't think any of the 2 assignment could cause this. 

I've tried it locally couple of times and cannot reproduce it and I don't know how else this could happen so:
 - I've added logging and every time someone updates test assignment, it is logged (who, when, what, time taken by the assignment, completed cases, total cases)
 - I commented out the case that resets assignment when you accidentally open completed assignment as mention above. It used to be interpreted as restart. Now the test assignment is not restarted upon URL request, but simply updated when you finish testing.


Unfortunately, the data cannot be recovered, the only information left is reported issue 241188. If you want, I can insert data from same as on Ubuntu with avg. time from both other platforms (~27mins)
Comment 2 Vladimir Riha 2014-01-31 19:28:23 UTC
One case when this could happen I can think of is:
   - you start assignment (either fresh new or 100% finished)
   - this requestA hangs (I've seen up to 20minutes hangs)
   - Synergy shows error after 60seconds 
   - you repeat this action, making requestB
   - you submit results in say 10 minutes
   - Synergy saves them and shows it statistics
   - in next X minutes, original requestA is fulfilled and assignment is restarted, data lost

I'll add timestamps to these request so old request will never override data where lastUpdated record is higher then the one in received request.
Comment 3 Vladimir Riha 2014-01-31 20:38:11 UTC
Requests to restart/update assignments are now time aware:
 - each request contains time parameter
 - server checks if received time > last updated time in database
   - if true, updates record
   - if false, returns HTTP 409 Conflict and does not save data to DB
Comment 4 Jiri Kovalsky 2014-02-02 13:38:54 UTC
As far as I remember there were no such hanging problems. Everything went smoothly. After the completion I even saw that Mac OS X had 100% completion in the table.
Comment 5 Vladimir Riha 2014-02-03 08:46:46 UTC
I'm sorry I really don't know how else it could happen (also the API endpoint for manipulation with assignments checks if current user is assignee, if not returns Unauthorized error). I've added the timestamp checks and logging, not sure I can do anything more without more details.

Do you want me to insert the data from Windows/Linux to the Mac assignment?
Comment 6 Jiri Kovalsky 2014-02-03 09:15:37 UTC
If you can do that, please copy the Windows results into the Mac OS X assignment. You can close this issue and I will keep my eyes opened if this happens again. Thanks.
Comment 7 Vladimir Riha 2014-02-03 09:34:39 UTC
Done, thank you.
Comment 8 Vladimir Riha 2014-02-03 12:55:58 UTC
TomasD found reproducible case, when assignment is restarted but I'm not sure if it was your case:
   - have 2 tabs in browser
   - in one tab, start assignment (start testing) on a fresh new assignment (aka never started)
   - do some testing (don't submit data yet)
   - while testing in tabA, edit specification in tabB (e.g. while testing you've found wrong suite/case etc.) so delete it and save changes (it is possible because no assignment progress exists for this specification yet)
   - submit testing data in tabA
   - progress is saved OK, table shows X% completed
   - press Continue on assignment to resume testing

=> Synergy cannot match your progress to specification (structure change) and will restart assignment

I need to think how to fix this case, not really sure right now.
Comment 9 Jiri Kovalsky 2014-02-03 14:59:06 UTC
Much case was much simplier but good that Tomas discovered at least this one.
Comment 10 Vladimir Riha 2014-02-04 08:26:31 UTC
I've added temporary lock once you hit the Start button for the very first time. The lock is valid for 180 minutes (which mean you have to pause/finish assignment in this time otherwise the lock is released and all changes in specification are allowed) 

Even if the case in comment #8 happens (after the 180mins), the assignment is not restarted automatically but user is informed that resume action is not available due to specification structure change.