嗨,我在spring boot项目中运行junit集成测试时遇到异常。以下是日志。不知道可能是什么原因。但是如果我在junit测试上删除它,效果很好。需要删除的测试是使用powermock的测试。
2019-12-06 09:46:09.254 WARN 1065 --- [leFlushWriter:1] o.apache.cassandra.utils.NativeLibrary : open(/home/prasanth/primecastworkspace5/mep/api/target/embeddedCassandra/data/cassandra_unit_keyspace/mep_recipientgathering-29ea3330180c11ea80b17bc803db2fdf, O_RDONLY) failed, errno (2).
2019-12-06 09:46:09.254 ERROR 1065 --- [leFlushWriter:1] o.a.c.db.lifecycle.LogTransaction : Transaction log [mc_txn_flush_3b0c6150-180d-11ea-80b1-7bc803db2fdf.log in /home/prasanth/primecastworkspace5/mep/api/target/embeddedCassandra/data/cassandra_unit_keyspace/mep_recipientgathering-29ea3330180c11ea80b17bc803db2fdf] indicates txn was not completed, trying to abort it now
2019-12-06 09:46:09.254 ERROR 1065 --- [leFlushWriter:1] o.a.c.db.lifecycle.LogTransaction : Failed to abort transaction log [mc_txn_flush_3b0c6150-180d-11ea-80b1-7bc803db2fdf.log in /home/prasanth/primecastworkspace5/mep/api/target/embeddedCassandra/data/cassandra_unit_keyspace/mep_recipientgathering-29ea3330180c11ea80b17bc803db2fdf]
java.lang.RuntimeException: java.nio.file.NoSuchFileException: /home/prasanth/primecastworkspace5/mep/api/target/embeddedCassandra/data/cassandra_unit_keyspace/mep_recipientgathering-29ea3330180c11ea80b17bc803db2fdf/mc_txn_flush_3b0c6150-180d-11ea-80b1-7bc803db2fdf.log
at org.apache.cassandra.io.util.FileUtils.write(FileUtils.java:588)
at org.apache.cassandra.io.util.FileUtils.appendAndSync(FileUtils.java:569)
at org.apache.cassandra.db.lifecycle.LogReplica.append(LogReplica.java:85)
at org.apache.cassandra.db.lifecycle.LogReplicaSet.lambda$null$5(LogReplicaSet.java:210)
at org.apache.cassandra.utils.Throwables.perform(Throwables.java:113)
at org.apache.cassandra.utils.Throwables.perform(Throwables.java:103)
at org.apache.cassandra.db.lifecycle.LogReplicaSet.append(LogReplicaSet.java:210)
at org.apache.cassandra.db.lifecycle.LogFile.addRecord(LogFile.java:303)
at org.apache.cassandra.db.lifecycle.LogFile.abort(LogFile.java:256)
at org.apache.cassandra.utils.Throwables.perform(Throwables.java:113)
at org.apache.cassandra.utils.Throwables.perform(Throwables.java:103)
at org.apache.cassandra.utils.Throwables.perform(Throwables.java:98)
at org.apache.cassandra.db.lifecycle.LogTransaction$TransactionTidier.run(LogTransaction.java:258)
at org.apache.cassandra.db.lifecycle.LogTransaction$TransactionTidier.tidy(LogTransaction.java:242)
at org.apache.cassandra.utils.concurrent.Ref$GlobalState.release(Ref.java:321)
at org.apache.cassandra.utils.concurrent.Ref$State.ensureReleased(Ref.java:199)
at org.apache.cassandra.utils.concurrent.Ref.ensureReleased(Ref.java:119)
at org.apache.cassandra.db.lifecycle.LogTransaction.complete(LogTransaction.java:377)
at org.apache.cassandra.db.lifecycle.LogTransaction.doAbort(LogTransaction.java:394)
at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.abort(Transactional.java:144)
at org.apache.cassandra.db.lifecycle.LifecycleTransaction.doAbort(LifecycleTransaction.java:243)
at org.apache.cassandra.utils.concurrent.Transactional$AbstractTransactional.abort(Transactional.java:144)
at org.apache.cassandra.db.ColumnFamilyStore$Flush.flushMemtable(ColumnFamilyStore.java:1140)
at org.apache.cassandra.db.ColumnFamilyStore$Flush.run(ColumnFamilyStore.java:1086)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.cassandra.concurrent.NamedThreadFactory.lambda$threadLocalDeallocator$0(NamedThreadFactory.java:81)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.nio.file.NoSuchFileException: /home/prasanth/primecastworkspace5/mep/api/target/embeddedCassandra/data/cassandra_unit_keyspace/mep_recipientgathering-29ea3330180c11ea80b17bc803db2fdf/mc_txn_flush_3b0c6150-180d-11ea-80b1-7bc803db2fdf.log
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
at sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:214)
at java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:434)
at java.nio.file.Files.newOutputStream(Files.java:216)
at java.nio.file.Files.write(Files.java:3351)
at org.apache.cassandra.io.util.FileUtils.write(FileUtils.java:581)
... 27 common frames omitted
非常感谢