Exemple #1
0
        /// <exception cref="System.IO.IOException"/>
        public virtual void TestAverageMergeTime()
        {
            string         historyFileName  = "job_1329348432655_0001-1329348443227-user-Sleep+job-1329348468601-10-1-SUCCEEDED-default.jhist";
            string         confFileName     = "job_1329348432655_0001_conf.xml";
            Configuration  conf             = new Configuration();
            JobACLsManager jobAclsMgr       = new JobACLsManager(conf);
            Path           fulleHistoryPath = new Path(typeof(TestJobHistoryEntities).GetClassLoader().
                                                       GetResource(historyFileName).GetFile());
            Path fullConfPath = new Path(typeof(TestJobHistoryEntities).GetClassLoader().GetResource
                                             (confFileName).GetFile());

            HistoryFileManager.HistoryFileInfo info = Org.Mockito.Mockito.Mock <HistoryFileManager.HistoryFileInfo
                                                                                >();
            Org.Mockito.Mockito.When(info.GetConfFile()).ThenReturn(fullConfPath);
            JobId        jobId        = MRBuilderUtils.NewJobId(1329348432655l, 1, 1);
            CompletedJob completedJob = new CompletedJob(conf, jobId, fulleHistoryPath, true,
                                                         "user", info, jobAclsMgr);
            JobInfo jobInfo = new JobInfo(completedJob);

            // There are 2 tasks with merge time of 45 and 55 respectively. So average
            // merge time should be 50.
            NUnit.Framework.Assert.AreEqual(50L, jobInfo.GetAvgMergeTime());
        }
	private void detach_CompletedJobs(CompletedJob entity)
	{
		this.SendPropertyChanging();
		entity.Engineer = null;
	}
	private void attach_CompletedJobs(CompletedJob entity)
	{
		this.SendPropertyChanging();
		entity.Job = this;
	}
 partial void DeleteCompletedJob(CompletedJob instance);
 partial void UpdateCompletedJob(CompletedJob instance);
 partial void InsertCompletedJob(CompletedJob instance);
 private void detach_CompletedJobs(CompletedJob entity)
 {
     this.SendPropertyChanging();
     entity.Engineer = null;
 }
 private void attach_CompletedJobs(CompletedJob entity)
 {
     this.SendPropertyChanging();
     entity.Job = this;
 }
 partial void DeleteCompletedJob(CompletedJob instance);
 partial void UpdateCompletedJob(CompletedJob instance);
 partial void InsertCompletedJob(CompletedJob instance);