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 56477 - Perf. tests are started during classpath scan
Summary: Perf. tests are started during classpath scan
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: NB JUnit (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: issues@platform
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2005-03-15 16:26 UTC by L Martinek
Modified: 2009-10-01 14:34 UTC (History)
1 user (show)

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 L Martinek 2005-03-15 16:26:15 UTC
ProjectSupport.waitScanFinished() is called in PerformanceTestCase.setUp(),
however first test is started during classpath scan and it fails. Probably
ProjectSupport.waitScanFinished() isn't reliable. Should I file an issue against
xtest?
Comment 1 Marian Mirilovic 2005-03-18 08:16:28 UTC
I can't reproduce it with my tets, but I trust you.

Libor, do you have a test suite where is this issue reproducible for 100% ?
Comment 2 Marian Mirilovic 2005-03-18 10:55:28 UTC
Haha,
I've found it, it seems like we can reproduce it with our Actions test suite.

I think that method waitScanFinished() works , BUT it seems like we are asking
this question very soon, so scanning didn't start in that time, it started after
that moment, it looks like :
- start IDE
- start test
   - start test case
   - waitScanFinished
 - IDE starts scanning
   - wait warm up
.....

For now I can't find a way to know whether scan has been already running .... ,
but stay tuned ..
Comment 3 Marian Mirilovic 2005-04-20 08:52:49 UTC
Hmm, 
I've found out that method 
        ProjectSupport.waitScanFinished();
doesn't work as it has to !

If you try the next code :
        ProjectSupport.openProject("path to big project - JEdit");
        ProjectSupport.waitScanFinished();

the code pass without any problems , BUT after the method waitScanFinished is
called very soon, so in that time there is no scan dialog, it rises few seconds
later ... it means that the next actions are affected by scan dialog !!!

It doesn't work in NB4.1 , BUT I haven't found this behaviour in NB4.2 .


I've wrokarrounded this behaviour by the next code, but it prolongs the test run
by hours :
        ProjectSupport.openProject(System.getProperty("xtest.tmpdir")+"/jEdit41");
        
        //wait until scan finished 
        ProjectSupport.waitScanFinished();
        
        // try to check it again, it happend often that it hasn't finished
        waitNoEvent(10000);
        ProjectSupport.waitScanFinished();
Comment 4 Jiri Skrivanek 2005-04-20 09:22:27 UTC
It is connected to issue 57710. The sequence for opening project has changed so
we need to listen for change of PROPERTY_OPEN_PROJECTS property to be sure the
project is open. It was already fixed in trunk and it is merged also in branch
release41.

/cvs/xtest/plugins_src/ide/src/org/netbeans/xtest/plugin/ide/MainWithProjects.java,v
 <--  MainWithProjects.java
new revision: 1.10.38.1; previous revision: 1.10
/cvs/xtest/nbjunit/src/org/netbeans/junit/ide/ProjectSupport.java,v  <-- 
ProjectSupport.java
new revision: 1.9.10.1; previous revision: 1.9
Comment 5 L Martinek 2005-05-09 16:16:43 UTC
It doesn't solve our problem in performance tests when we restart IDE and scan
dialog appears after restart. I am pretty sure that the scan dialog is already
opened when we call ProjectSupport.waitScanFinished() is it's not problem of
early calling before scan dialog appearing.
Comment 6 Jiri Skrivanek 2005-05-20 15:44:01 UTC
I don't know what caused you problem but we haven't changed anything in
ProjectSupport. For 4.1 this issue was resolved and for 4.2 scanning was put to
background. There should not be problem with scanning dialog anymore.
Comment 7 Marian Mirilovic 2009-10-01 14:34:01 UTC
fix status