private void UpdateTestData(JudgeContext context) { JudgeTask task = context.Task; // 检查本地测试数据是否为最新 if (!TestDataManager.CheckDataVersion(task.ProblemId, task.DataVersion)) { LogInvalidTestData(task.ProblemId); ITestDataFetcher fetcher = AdapterFactory.CreateTestDataFetcher(); TestDataManager.WriteTestData(task.ProblemId, fetcher.Fetch(context)); LogTestDataFetched(task.ProblemId); } }