IndexJobManagerTest fails when trying to build scala-search

28 views
Skip to first unread message

Matthias Langer

unread,
Nov 5, 2014, 3:28:39 AM11/5/14
to scala-...@googlegroups.com
Hello,

I just wanted to take a look at scala-search; unfortunately I see test failures (see attachments):

$ ./build.sh
[...]
[...]
2014-11-05 08:51:09,935  INFO [main] - ScalaPresentationCompiler - shutting down presentation compiler on pro
Tests run: 163, Failures: 1, Errors: 0, Skipped: 3, Time elapsed: 163.779 sec <<< FAILURE!

Results :

Failed tests:   deletesIndexWhenProjectIsDeleted(org.scala.tools.eclipse.search.IndexJobManagerTest)

Tests run: 163, Failures: 1, Errors: 0, Skipped: 3

2014-11-05 08:51:10,375 DEBUG [Worker-3] - ProjectIndexJob - The index was broken so we delete it and re-inde
2014-11-05 08:51:10,375 DEBUG [Worker-10] - ProjectIndexJob - The index was broken so we delete it and re-ind
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Scala Search ...................................... SUCCESS [3.472s]
[INFO] org.scala.tools.eclipse.search .................... SUCCESS [1:02.126s]
[INFO] org.scala.tools.eclipse.search.tests .............. FAILURE [3:24.191s]

Interestingly enough the same test runs fine from within Eclipse. Should I look into this, or is there an obvious solution?

Regards,
Matthias




org.scala.tools.eclipse.search.TestsSuite.txt
TEST-org.scala.tools.eclipse.search.TestsSuite.xml

Matthias Langer

unread,
Nov 5, 2014, 6:27:26 AM11/5/14
to scala-...@googlegroups.com
This seems to be a Windows file locking issue, as I cannot reproduce this on Linux; using https://github.com/mlangc/scala-search/compare/fix-IndexJobManagerTest I can see that the reason for the failed test is that

org.scala.tools.eclipse.search.tests\target\index-job-manager-test\IndexJobManagerTest-ToBeDeletedIndex

cannot be deleted. I'll look into this further...

Simon Schäfer

unread,
Nov 5, 2014, 7:39:03 AM11/5/14
to scala-...@googlegroups.com
I noticed this behavior too, but even on a Linux machine (well, it was Ubuntu). There is even a ticket for it: https://www.assembla.com/spaces/scala-ide/tickets/1002330#/activity/ticket: I don't know if that is a problem of Scala IDE, Eclipse, maven or the OS one is using.
--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-dev/93ddbac3-6fb5-4c37-a304-a380eb7e7d42%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matthias Langer

unread,
Nov 5, 2014, 9:51:45 AM11/5/14
to scala-...@googlegroups.com
This is very strange indeed; on the one hand side I see (using https://github.com/mlangc/scala-search/compare/fix-IndexJobManagerTest?expand=1#diff-517ad9dd00ff77caf534956bb59a5cedR85)

2014-11-05 15:08:09,622 DEBUG [Worker-1] - $anon$1 - Error deleting 'C:\Users\mla\development\public-sources\debug\scala-search\org.scala.tools.eclipse.search.tests\target\index-job-manager-test\IndexJobManagerTest-ToBeDeletedIndex'^M
java.nio.file.NoSuchFileException: target\index-job-manager-test\IndexJobManagerTest-ToBeDeletedIndex^M
  at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:79)^M
  at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)^M
  at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)^M
  at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)^M
  at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)^M
  at java.nio.file.Files.delete(Files.java:1079)^M
  at org.scala.tools.eclipse.search.indexing.Index$class.verboseDelete$1(Index.scala:87)^M
  at org.scala.tools.eclipse.search.indexing.Index$class.deleteRec$1(Index.scala:101)^M
  at org.scala.tools.eclipse.search.indexing.Index$$anonfun$deleteIndex$1.apply$mcZ$sp(Index.scala:105)^M
  at org.scala.tools.eclipse.search.indexing.Index$$anonfun$deleteIndex$1.apply(Index.scala:105)^M
  at org.scala.tools.eclipse.search.indexing.Index$$anonfun$deleteIndex$1.apply(Index.scala:105)^M
  at scala.util.Try$.apply(Try.scala:191)^M
  at org.scala.tools.eclipse.search.indexing.Index$class.deleteIndex(Index.scala:105)^M
  at org.scala.tools.eclipse.search.IndexJobManagerTest$$anon$1.deleteIndex(IndexJobManagerTest.scala:42)^M
  at org.scala.tools.eclipse.search.indexing.SourceIndexer.indexProject(SourceIndexer.scala:36)^M
  at org.scala.tools.eclipse.search.jobs.ProjectIndexJob.run(ProjectIndexJob.scala:92)^M
  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)^M

which indicates that the index directory should no longer be there, and on the other hand the test suite complains because C:\Users\mla\development\public-sources\debug\scala-search\org.scala.tools.eclipse.search.tests\target\index-job-manager-test\IndexJobManagerTest-ToBeDeletedIndex still exists, which is true at least after the tests.

Is it possible that the directory is recreated after being deleted somehow?


Simon Schäfer

unread,
Nov 5, 2014, 10:13:16 AM11/5/14
to scala-...@googlegroups.com
Yes, Eclipse can do that. Does the error only appear when Eclipse is started and the scala-search project is opened or does it also happen when Eclipse is closed?


--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

iulian dragos

unread,
Nov 5, 2014, 10:36:08 AM11/5/14
to scala-ide-dev
I actually ignored that test for building the release: https://github.com/scala-ide/scala-search/tree/0.2.4-2 I should probably merge that in master, I missed that.


For more options, visit https://groups.google.com/d/optout.



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Matthias Langer

unread,
Nov 6, 2014, 2:37:47 AM11/6/14
to scala-...@googlegroups.com

Is it possible that the directory is recreated after being deleted somehow?
Yes, Eclipse can do that. Does the error only appear when Eclipse is started and the scala-search project is opened or does it also happen when Eclipse is closed?

No, the error also appears when Eclipse is closed; apart from that I'm running the build on a copy that is not imported into Eclipse.

Matthias Langer

unread,
Nov 6, 2014, 2:45:24 AM11/6/14
to scala-...@googlegroups.com

I actually ignored that test for building the release: https://github.com/scala-ide/scala-search/tree/0.2.4-2 I should probably merge that in master, I missed that.

Hmm, do you have any idea where the error might come from? What's also interesting is that the failure seems to go away if I run the test separately (by passing -Dtest=IndexJobManagerTest to maven) or if I replace "clean install" with "install". Last but not least, as already stated, the test works fine when started from within Eclipse.
 

iulian dragos

unread,
Nov 7, 2014, 3:20:36 AM11/7/14
to scala-ide-dev
I don't know exactly what's happening, but what I could deduce from logs was that the directory *is* removed when the project is deleted, but it exists on disk when the test fails. So it seems Scala-search recreates it for some reason, maybe on another thread, reacting to some event that otherwise doesn't occur, or occurs in a different order.

On Thu, Nov 6, 2014 at 9:45 AM, Matthias Langer <m.lan...@gmail.com> wrote:

I actually ignored that test for building the release: https://github.com/scala-ide/scala-search/tree/0.2.4-2 I should probably merge that in master, I missed that.

Hmm, do you have any idea where the error might come from? What's also interesting is that the failure seems to go away if I run the test separately (by passing -Dtest=IndexJobManagerTest to maven) or if I replace "clean install" with "install". Last but not least, as already stated, the test works fine when started from within Eclipse.
 

--
You received this message because you are subscribed to the Google Groups "Scala IDE Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-de...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages