long bTime,eTime,timeSpan1,timeSpan2;
long bTime,eTime,timeSpan1,timeSpan2, timeSpan3;
	public void testCancelRunAndRenderTask( )	{		String input = getClassFolder( )				+ System.getProperty( "file.separator" ) + INPUT_FOLDER				+ System.getProperty( "file.separator" ) + "pages9.rptdesign";		long bTime,eTime,timeSpan1,timeSpan2;		try		{			IReportRunnable runnable = engine					.openReportDesign( new FileInputStream( new File( input ) ) );			IRunAndRenderTask task = engine.createRunAndRenderTask( runnable );			HTMLRenderOption option=new HTMLRenderOption();			option.setOutputFormat( "html" );			task.setRenderOption( option );			task.setAppContext( new HashMap() );						CancelTask cancelThread = new CancelTask( "cancelThread", task );			cancelThread.start( );			bTime=System.currentTimeMillis( );			task.run( );			eTime=System.currentTimeMillis( );			task.close( );			timeSpan1=eTime-bTime;			task=engine.createRunAndRenderTask( runnable );			task.setRenderOption( option );			task.setAppContext( new HashMap() );			bTime=System.currentTimeMillis( );			task.run( );			eTime=System.currentTimeMillis( );			task.close( );			timeSpan2=eTime-bTime;			assertTrue("RunAndRenderTask.cancel() failed!",timeSpan2>timeSpan1);		}		catch ( Exception e )		{			e.printStackTrace( );			fail("RunAndRenderTask.cancel() failed!");		}	}