本文整理汇总了Java中edu.umd.cs.mtc.TestFramework.runOnce方法的典型用法代码示例。如果您正苦于以下问题:Java TestFramework.runOnce方法的具体用法?Java TestFramework.runOnce怎么用?Java TestFramework.runOnce使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类edu.umd.cs.mtc.TestFramework
的用法示例。
在下文中一共展示了TestFramework.runOnce方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) throws Throwable {
/*
* Create a Test object
*/
ProducerConsumerTest test=new ProducerConsumerTest();
/*
* Execute the test
*/
System.out.printf("Main: Starting the test\n");
TestFramework.runOnce(test);
System.out.printf("Main: The test has finished\n");
}
示例2: readOnlyReleaseAtStart
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void readOnlyReleaseAtStart() throws Throwable {
// System.out.println("START5");
// for (Thread i : Thread.getAllStackTraces().keySet()) {
// System.out.println(i.getName());
// }
// System.out.println();
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
// System.out.println("POST5");
// for (Thread i : Thread.getAllStackTraces().keySet()) {
// System.out.println(i.getName());
// }
// System.out.println();
Assert.assertEquals(1, state("x"));
}
示例3: testWrite
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void testWrite()
throws Throwable
{
ConcurrentFileWrite concurrentFileWrite = new ConcurrentFileWrite( fileLockManager );
//concurrentFileWrite.setTrace( true );
TestFramework.runOnce( concurrentFileWrite );
logger.info( "success: {}", concurrentFileWrite.success );
Assert.assertEquals( 10, concurrentFileWrite.success.intValue() );
}
示例4: releaseAfterOneBufferedWriteToRWTransaction
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void releaseAfterOneBufferedWriteToRWTransaction() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(0, state("x"));
}
示例5: releaseAfterReadInRWTransactionToWRTransaction
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void releaseAfterReadInRWTransactionToWRTransaction() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(2, state("x"));
}
示例6: writeFirstReadFromBufferOnce
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void writeFirstReadFromBufferOnce() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(2, state("x"));
}
示例7: writeBufferCommitOrder
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void writeBufferCommitOrder() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(2, state("x"));
}
示例8: detectInvalidAccessModeRead
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void detectInvalidAccessModeRead() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(0, state("x"));
}
示例9: detectInvalidAccessModeAnyWrite
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void detectInvalidAccessModeAnyWrite() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(0, state("x"));
}
示例10: writeOnlyTransactionAborting
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void writeOnlyTransactionAborting() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(1, state("x"));
Assert.assertEquals(0, state("y"));
}
示例11: writeSeriesFirstReadFromBufferCommitOrder
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void writeSeriesFirstReadFromBufferCommitOrder() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(3, state("x"));
}
示例12: releaseAfterOneBufferedWriteToRWTransaction
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void releaseAfterOneBufferedWriteToRWTransaction() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(2, state("x"));
}
示例13: releaseAfterReadAndWriteToWRTransactionAndAbort
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void releaseAfterReadAndWriteToWRTransactionAndAbort() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(0, state("x"));
}
示例14: releaseAfterOneBufferedWriteToWRTransactionAndAbort
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void releaseAfterOneBufferedWriteToWRTransactionAndAbort() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(0, state("x"));
}
示例15: simultaneousWriteOnlyTransactions
import edu.umd.cs.mtc.TestFramework; //导入方法依赖的package包/类
@Test
public void simultaneousWriteOnlyTransactions() throws Throwable {
TaskController.emergencyStart();
Heartbeat.emergencyStart();
TestFramework.runOnce(new Threads());
Assert.assertEquals(2, state("x"));
Assert.assertEquals(1, state("y"));
}