Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 325553 - Failing team.cvs tests (ResourceMapperTests#testCacheBase)
Summary: Failing team.cvs tests (ResourceMapperTests#testCacheBase)
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Releng (show other bugs)
Version: 3.6.2   Edit
Hardware: All All
: P2 normal (vote)
Target Milestone: 3.7 M6   Edit
Assignee: Kim Moir CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-17 04:40 EDT by Szymon Brandys CLA
Modified: 2011-03-25 17:03 EDT (History)
3 users (show)

See Also:


Attachments
Test fix (6.98 KB, patch)
2011-02-24 05:27 EST, Tomasz Zarna CLA
no flags Details | Diff
mylyn/context/zip (89.70 KB, application/octet-stream)
2011-02-24 05:27 EST, Tomasz Zarna CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2010-09-17 04:40:39 EDT
team.cvs tests listed below fail occasionally. 

ProjectSetImporterTests#testImportMultipleProjects
ResourceMapperTests#testCacheBase

These tests fail on all machines, but usually on only one during a build. The reason of failures are server timeouts. Failures just started couple week ago and were not related to any code change in the team/cvs plug-ins.
Comment 1 Kim Moir CLA 2010-09-17 09:35:35 EDT
It looks like it's failing creating this file 

testCacheBase-1284717450668

We have three test machines connecting to the same cvs test server. Does the test suite create folders with a randomly generated filename? Could there be file contention from one of the other test machines?
Comment 2 Tomasz Zarna CLA 2010-09-17 10:07:31 EDT
(In reply to comment #1)
> Does the test suite create folders with a randomly generated filename? 

The project name is suffixed with System.currentTimeMillis()[1]. Except for the project name, folders and files have their names hardcoded.

> Could there be file contention from one of the other test machines?

Given the above I think it's the case. 

[1] org.eclipse.team.tests.ccvs.core.EclipseTest.getUniqueTestProject(String)
Comment 3 Kim Moir CLA 2010-09-23 15:47:32 EDT
I looked at this for today and completely reinitialized the CVS test repo.  It seems like the configuration was hosed for pserver.  I reran the tests from last night and they all passed.
Comment 4 Tomasz Zarna CLA 2010-12-01 04:28:06 EST
Unfortunately, it happened again.

ResourceMapperTests#testCacheBase failed again in the latest I-build:
http://download.eclipse.org/eclipse/downloads/drops/I20101130-0900/testresults/html/org.eclipse.team.tests.cvs.core_win32.win32.x86_6.0.html

You already know about failing ProjectSetImporterTests#testImportMultipleProjects, see bug 246547.
Comment 5 Kim Moir CLA 2010-12-02 15:52:39 EST
I was rerunning the tests today and they passed.  I asked you this before but the name of the filename that's created in the test cvs repo is created according to the timestamp, correct?  I don't know if multiple test suites running at once against the same repo is causing issues. Another note is that this machine was updated to a faster one a few months ago, not sure if this is causing file contention as well.
Comment 6 Tomasz Zarna CLA 2010-12-03 04:54:26 EST
(In reply to comment #5)
> I asked you this before but the name of the filename that's created in the test cvs repo is created
> according to the timestamp, correct?  

Yup, see comment 2.
Comment 7 Tomasz Zarna CLA 2010-12-07 04:53:58 EST
ResourceMapperTests#testCacheBase passed in I20101205-2000 and I20101206-1300. Results for I20101206-1800 are still pending.
Comment 8 Dani Megert CLA 2011-02-10 04:31:18 EST
Also failed again in M20110209-1607.
Comment 9 Dani Megert CLA 2011-02-21 04:24:30 EST
Failed again in N20110218-2000.

Please make the test more robust or delete it as it causes noise in the build results.
Comment 10 Szymon Brandys CLA 2011-02-23 09:03:59 EST
I would suggest to make the test invulnerable to this particular failure. I would leave the bug open and log the problem in the build logs when it happens again. It would help to notice whether any Kim's changes in the configuration help.

Tomek, please make the change.
Comment 11 Tomasz Zarna CLA 2011-02-24 05:27:24 EST
Created attachment 189681 [details]
Test fix

If the exception being thrown in the test is caused by InterruptedIOException the fix prevents the test from failing but log the exception.
Comment 12 Tomasz Zarna CLA 2011-02-24 05:27:28 EST
Created attachment 189682 [details]
mylyn/context/zip
Comment 13 Tomasz Zarna CLA 2011-02-24 05:35:50 EST
The fix has been applied to HEAD (with minor changes). Available in build >=N20110224-2000. I'm leaving the bug open as suggested in comment 10.
Comment 14 Kim Moir CLA 2011-03-25 17:03:04 EDT
I think this bug can be closed.