atomix / copycat

A novel implementation of the Raft consensus algorithm
http://atomix.io/copycat
Apache License 2.0
581 stars 155 forks source link

copycat 1.2.4 server fails build test #315

Open nvySub opened 7 years ago

nvySub commented 7 years ago

When building copycat on windows under eclipse the build test fails.

Build environment: Eclipse Neon3 4.6.3 Buildship: Eclipse Plug-ins for Gradle 1.0.21.v20161010-1640 org.eclipse.buildship.feature.group Eclipse Buildship Code Recommenders for Java Developers 2.4.6.v20170307-1041 org.eclipse.recommenders.rcp.feature.feature.group Eclipse Code Recommenders Code Recommenders Mylyn Integration 2.4.6.v20170307-1041 org.eclipse.recommenders.mylyn.rcp.feature.feature.group Eclipse Code Recommenders Code Recommenders Snipmatch 2.4.6.v20170307-1041 org.eclipse.recommenders.snipmatch.rcp.feature.feature.group Eclipse Code Recommenders Eclipse IDE for Java Developers 4.6.3.20170314-1500 epp.package.java Eclipse Packaging Project Eclipse Java Development Tools 3.12.3.v20170301-0400 org.eclipse.jdt.feature.group Eclipse.org Eclipse XML Editors and Tools 3.8.2.v201702270442 org.eclipse.wst.xml_ui.feature.feature.group Eclipse Web Tools Platform Git integration for Eclipse 4.6.1.201703071140-r org.eclipse.egit.feature.group Eclipse EGit Git integration for Eclipse - Task focused interface 4.6.1.201703071140-r org.eclipse.egit.mylyn.feature.group Eclipse EGit Java implementation of Git 4.6.1.201703071140-r org.eclipse.jgit.feature.group Eclipse JGit m2e - Maven Integration for Eclipse (includes Incubating components) 1.7.0.20160603-1933 org.eclipse.m2e.feature.feature.group Eclipse.org - m2e m2e - slf4j over logback logging (Optional) 1.7.0.20160603-1933 org.eclipse.m2e.logback.feature.feature.group Eclipse.org - m2e Mylyn Builds Connector: Hudson/Jenkins 1.13.0.v20160806-1446 org.eclipse.mylyn.hudson.feature.group Eclipse Mylyn Mylyn Context Connector: Eclipse IDE 3.21.0.v20160912-1820 org.eclipse.mylyn.ide_feature.feature.group Eclipse Mylyn Mylyn Context Connector: Java Development 3.21.0.v20160701-1337 org.eclipse.mylyn.java_feature.feature.group Eclipse Mylyn Mylyn Task List 3.21.0.v20160914-0252 org.eclipse.mylyn_feature.feature.group Eclipse Mylyn Mylyn Task-Focused Interface 3.21.0.v20160815-2336 org.eclipse.mylyn.context_feature.feature.group Eclipse Mylyn Mylyn Tasks Connector: Bugzilla 3.21.0.v20160909-1813 org.eclipse.mylyn.bugzilla_feature.feature.group Eclipse Mylyn Mylyn Versions Connector: Git 1.13.0.v20160630-2022 org.eclipse.mylyn.git.feature.group Eclipse Mylyn Mylyn WikiText 2.10.1.v20161129-1925 org.eclipse.mylyn.wikitext_feature.feature.group Eclipse Mylyn

Java version: JDK 1.8.0_121

The following output for copycat server is observed.

22:52:55.318 [test-server] DEBUG i.a.c.server.storage.SegmentManager - Created segment: Segment[id=1, version=1, index=0, length=0] 22:52:55.321 [test-server] DEBUG i.a.c.server.storage.SegmentManager - Created segment: Segment[id=1, version=1, index=0, length=0] 22:52:55.329 [test-server] DEBUG i.a.c.server.storage.SegmentManager - Created segment: Segment[id=1, version=1, index=0, length=0] 22:52:55.334 [test-server] DEBUG i.a.c.server.storage.SegmentManager - Created segment: Segment[id=1, version=1, index=0, length=0] 22:52:55.338 [test-server] DEBUG i.a.c.server.storage.SegmentManager - Created segment: Segment[id=1, version=1, index=0, length=0] 22:52:55.343 [test-server] DEBUG i.a.c.server.storage.SegmentManager - Created segment: Segment[id=1, version=1, index=0, length=0] 22:52:55.345 [test-server] DEBUG i.a.c.server.state.ServerContext - localhost/127.0.0.1:5000 - Set term 2 22:52:55.346 [test-server] DEBUG i.a.c.server.state.PassiveState - localhost/127.0.0.1:5000 - Rejected AppendRequest[term=1, leader=2130712285, logIndex=2, logTerm=2, entries=[0], commitIndex=0, globalIndex=0]: request term is less than the current term (2) 22:52:55.348 [test-server] DEBUG i.a.c.server.storage.SegmentManager - Created segment: Segment[id=1, version=1, index=0, length=0] 22:52:55.351 [test-server] DEBUG i.a.c.server.state.ServerContext - localhost/127.0.0.1:5000 - Set term 1 Tests run: 760, Failures: 5, Errors: 0, Skipped: 7, Time elapsed: 771.047 sec <<< FAILURE! - in TestSuite testDeleteMetaStore(io.atomix.copycat.server.storage.MetaStoreTest) Time elapsed: 0.002 sec <<< FAILURE! java.lang.AssertionError: expected [0] but found [1] at io.atomix.copycat.server.storage.MetaStoreTest.testDeleteMetaStore(MetaStoreTest.java:115)

cleanupStorage(io.atomix.copycat.server.storage.MetaStoreTest) Time elapsed: 0.002 sec <<< FAILURE! java.nio.file.FileSystemException: target\test-logs\6054e526-7877-406c-9518-3a341d428deb\test.meta: The process cannot access the file because it is being used by another process.

at io.atomix.copycat.server.storage.MetaStoreTest.cleanupStorage(MetaStoreTest.java:124)

testDescriptorBuilder(io.atomix.copycat.server.storage.SegmentDescriptorTest) Time elapsed: 0.001 sec <<< FAILURE! java.lang.AssertionError: expected [1491047575354] but found [0] at io.atomix.copycat.server.storage.SegmentDescriptorTest.testDescriptorBuilder(SegmentDescriptorTest.java:59)

deleteDescriptor(io.atomix.copycat.server.storage.SegmentDescriptorTest) Time elapsed: 0.001 sec <<< FAILURE! java.nio.file.FileSystemException: descriptor.log: The process cannot access the file because it is being used by another process.

at io.atomix.copycat.server.storage.SegmentDescriptorTest.deleteDescriptor(SegmentDescriptorTest.java:142)

cleanLogDir(io.atomix.copycat.server.storage.FileLogTest) Time elapsed: 0 sec <<< FAILURE! java.nio.file.FileSystemException: target\test-logs\6054e526-7877-406c-9518-3a341d428deb\test.meta: The process cannot access the file because it is being used by another process.

Results :

Failed tests: FileLogTest>AbstractLogTest.cleanLogDir:124 » FileSystem target\test-logs\6054... io.atomix.copycat.server.storage.MetaStoreTest.cleanupStorage(io.atomix.copycat.server.storage.MetaStoreTest) Run 1: MetaStoreTest.cleanupStorage:124 » FileSystem target\test-logs\6054e526-7877-4... Run 2: PASS Run 3: PASS

MetaStoreTest.testDeleteMetaStore:115 expected [0] but found [1] io.atomix.copycat.server.storage.SegmentDescriptorTest.deleteDescriptor(io.atomix.copycat.server.storage.SegmentDescriptorTest) Run 1: SegmentDescriptorTest.deleteDescriptor:142 » FileSystem descriptor.log: The pr... Run 2: PASS Run 3: PASS

SegmentDescriptorTest.testDescriptorBuilder:59 expected [1491047575354] but found [0]

Tests run: 756, Failures: 5, Errors: 0, Skipped: 3

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 13:21 min [INFO] Finished at: 2017-04-01T22:53:43+11:00 [INFO] Final Memory: 16M/162M

jhall11 commented 7 years ago

target\test-logs\6054e526-7877-406c-9518-3a341d428deb\test.meta: The process cannot access the file because it is being used by another process.

Are there multiple tests being run at the same time? I was able to run the tests through maven and through Intellij without any failures.

nvySub commented 7 years ago

I don't know. I was hoping someone here can tell me. I'm very new to the maven build process. I just downloaded version 1.2.4 imported to eclipse then right clicked on the top level project and selected "run as" -> "maven install"

Is there some parameters I need to set? Is maven configured to start multiple compile threads? Is some default eclipse setting doing this?