You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(142) |
Jun
(27) |
Jul
(122) |
Aug
(36) |
Sep
(59) |
Oct
(86) |
Nov
(140) |
Dec
(80) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(52) |
Feb
(153) |
Mar
(118) |
Apr
(143) |
May
(123) |
Jun
(64) |
Jul
(282) |
Aug
(469) |
Sep
(56) |
Oct
(201) |
Nov
(182) |
Dec
(31) |
| 2005 |
Jan
(229) |
Feb
(316) |
Mar
(187) |
Apr
(130) |
May
(190) |
Jun
(154) |
Jul
(148) |
Aug
(133) |
Sep
(209) |
Oct
(234) |
Nov
(100) |
Dec
(40) |
| 2006 |
Jan
(1) |
Feb
(87) |
Mar
(73) |
Apr
(126) |
May
(58) |
Jun
(8) |
Jul
(12) |
Aug
(14) |
Sep
(22) |
Oct
(33) |
Nov
(4) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
|
2
(4) |
3
|
4
|
5
|
|
6
|
7
|
8
|
9
|
10
|
11
|
12
|
|
13
(12) |
14
(2) |
15
|
16
(1) |
17
|
18
|
19
|
|
20
|
21
(15) |
22
|
23
(9) |
24
(2) |
25
|
26
|
|
27
(13) |
28
(2) |
29
(4) |
30
|
|
|
|
|
From: Garrett M. S. <gm...@us...> - 2004-06-29 17:11:42
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1516/project/core/sourcecontrol Modified Files: Vss.cs Log Message: Vss is now getting source by label if ApplyLabel is true. Index: Vss.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/Vss.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Vss.cs 28 Jun 2004 01:08:15 -0000 1.26 --- Vss.cs 29 Jun 2004 17:11:31 -0000 1.27 *************** *** 5,11 **** using ThoughtWorks.CruiseControl.Core.Util; - // TODO remove - using System.Threading; - namespace ThoughtWorks.CruiseControl.Core.Sourcecontrol { --- 5,8 ---- *************** *** 21,27 **** internal const string SS_EXE = "ss.exe"; - // ss history [dir] -R -Vd[now]~[lastBuild] -Y[un,pw] -I-Y -O[tempFileName] internal static readonly string HISTORY_COMMAND_FORMAT = @"history {0} -R -Vd{1}~{2} -Y{3},{4} -I-Y"; ! internal static readonly string GET_COMMAND_FORMAT = @"get {0} -R -Vd{1} -Y{2},{3} -I-N"; internal static readonly string LABEL_COMMAND_FORMAT = @"label {0} -L{1} -VL{2} -Y{3},{4} -I-Y"; internal static readonly string LABEL_COMMAND_FORMAT_NOTIMESTAMP = @"label {0} -L{1} -Y{2},{3} -I-Y"; --- 18,24 ---- internal const string SS_EXE = "ss.exe"; internal static readonly string HISTORY_COMMAND_FORMAT = @"history {0} -R -Vd{1}~{2} -Y{3},{4} -I-Y"; ! internal static readonly string GET_BY_DATE_COMMAND_FORMAT = @"get {0} -R -Vd{1} -Y{2},{3} -I-N"; ! internal static readonly string GET_BY_LABEL_COMMAND_FORMAT = @"get {0} -R -VL{1} -Y{2},{3} -I-N"; internal static readonly string LABEL_COMMAND_FORMAT = @"label {0} -L{1} -VL{2} -Y{3},{4} -I-Y"; internal static readonly string LABEL_COMMAND_FORMAT_NOTIMESTAMP = @"label {0} -L{1} -Y{2},{3} -I-Y"; *************** *** 198,210 **** Log.Info("Getting source from VSS"); ! string arguments = string.Format(GET_COMMAND_FORMAT, Project, FormatCommandDate(result.StartTime), Username, Password); ! ProcessInfo processInfo = CreateProcessInfo(arguments); Execute(processInfo); } ! internal string LastTempLabel { ! get { return _lastTempLabel; } ! set { _lastTempLabel = value; } } --- 195,216 ---- Log.Info("Getting source from VSS"); ! ProcessInfo processInfo = CreateProcessInfo( DetermineGetSourceCommand( result ) ); Execute(processInfo); } ! internal string DetermineGetSourceCommand(IntegrationResult result) { ! if ( ApplyLabel && WasTempLabelApplied() ) ! { ! return string.Format(GET_BY_LABEL_COMMAND_FORMAT, Project, _lastTempLabel, Username, Password); ! } ! else if ( !ApplyLabel ) ! { ! return string.Format(GET_BY_DATE_COMMAND_FORMAT, Project, FormatCommandDate(result.StartTime), Username, Password); ! } ! else ! { ! throw new CruiseControlException( "illegal state: applylabel true but no temp label" ); ! } } |
|
From: Owen R. <exo...@us...> - 2004-06-29 12:24:19
|
Update of /cvsroot/ccnet/ccnet/project/core/state/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26806/project/core/state/test Modified Files: IntegrationStateManagerTest.cs Log Message: committing patch for issue ccnet-117 improved logging from ccservice Index: IntegrationStateManagerTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/state/test/IntegrationStateManagerTest.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** IntegrationStateManagerTest.cs 5 Nov 2003 13:47:21 -0000 1.5 --- IntegrationStateManagerTest.cs 29 Jun 2004 12:24:09 -0000 1.6 *************** *** 1,6 **** - using System; using System.IO; - using System.Xml; - using Exortech.NetReflector; using NUnit.Framework; --- 1,3 ---- *************** *** 19,23 **** [SetUp] ! protected void SetUp() { _state = new IntegrationStateManager(); --- 16,20 ---- [SetUp] ! public void SetUp() { _state = new IntegrationStateManager(); *************** *** 27,31 **** [TearDown] ! protected void TearDown() { TempFileUtil.DeleteTempDir(_tempDir); --- 24,28 ---- [TearDown] ! public void TearDown() { TempFileUtil.DeleteTempDir(_tempDir); *************** *** 131,134 **** --- 128,144 ---- _state.SaveState(result); } + + [Test] + public void SaveAndReloadWithUnicodeCharacters() + { + _state.Directory = _tempDir; + + IntegrationResult result = IntegrationResultMother.CreateSuccessful(); + result.ProjectName = "hi there? håkan! \u307b"; + _state.SaveState(result); + + IntegrationResult actual = _state.LoadState(); + AssertEquals(result.ProjectName, actual.ProjectName); + } } } |
|
From: Owen R. <exo...@us...> - 2004-06-29 12:24:19
|
Update of /cvsroot/ccnet/ccnet/project/service In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26806/project/service Modified Files: app.config Log Message: committing patch for issue ccnet-117 improved logging from ccservice Index: app.config =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/service/app.config,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** app.config 30 May 2004 18:11:30 -0000 1.7 --- app.config 29 Jun 2004 12:24:09 -0000 1.8 *************** *** 31,37 **** --- 31,44 ---- <system.diagnostics> + <switches> + <!-- <add name="CruiseControlSwitch" value="1" /> --> <!-- Error: Output only error messages --> + <!-- <add name="CruiseControlSwitch" value="2" /> --> <!-- Warning: All warnings and errors --> + <!-- <add name="CruiseControlSwitch" value="3" /> --> <!-- Info: All warnings, errors and informational messages --> + <add name="CruiseControlSwitch" value="4" /> <!-- Verbose: All messages --> + </switches> <trace autoflush="false" indentsize="4"> <listeners> <add name="EventLogListener" type="System.Diagnostics.EventLogTraceListener" /> + <add name="LogFileTraceListener" type="ThoughtWorks.CruiseControl.Core.Util.LogFileTraceListener,ThoughtWorks.CruiseControl.Core" initializeData="ccnet.log" /> <remove name="Default"/> </listeners> |
|
From: Owen R. <exo...@us...> - 2004-06-29 12:24:17
|
Update of /cvsroot/ccnet/ccnet/project/core/state In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26806/project/core/state Modified Files: IntegrationStateManager.cs Log Message: committing patch for issue ccnet-117 improved logging from ccservice Index: IntegrationStateManager.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/state/IntegrationStateManager.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** IntegrationStateManager.cs 8 Apr 2004 04:56:55 -0000 1.7 --- IntegrationStateManager.cs 29 Jun 2004 12:24:08 -0000 1.8 *************** *** 1,5 **** using System; using System.IO; ! using System.Xml; using System.Xml.Serialization; using Exortech.NetReflector; --- 1,5 ---- using System; using System.IO; ! using System.Text; using System.Xml.Serialization; using Exortech.NetReflector; *************** *** 10,16 **** public class IntegrationStateManager : IStateManager { ! XmlSerializer _serializer; ! string _directory = System.IO.Directory.GetCurrentDirectory(); // default ! string _filename = "ccnet.state"; // default public IntegrationStateManager() --- 10,16 ---- public class IntegrationStateManager : IStateManager { ! private XmlSerializer _serializer; ! private string _directory = System.IO.Directory.GetCurrentDirectory(); // default ! private string _filename = "ccnet.state"; // default public IntegrationStateManager() *************** *** 79,83 **** try { ! return new StreamWriter(path); } catch (SystemException ex) --- 79,83 ---- try { ! return new StreamWriter(path, false, Encoding.Unicode); } catch (SystemException ex) |
|
From: Garrett M. S. <gm...@us...> - 2004-06-28 01:08:24
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16618/project/core/sourcecontrol/test Modified Files: VssTest.cs Log Message: Fixed bug CCNET-71. http://jira.public.thoughtworks.org/browse/CCNET-71 Index: VssTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test/VssTest.cs,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** VssTest.cs 27 Jun 2004 09:31:50 -0000 1.28 --- VssTest.cs 28 Jun 2004 01:08:15 -0000 1.29 *************** *** 115,124 **** public void CreateLabelProcess() { ! string label = "testLabel"; ! DateTime dateTime = new DateTime(2003, 4, 15, 11, 12, 13, 0); ! ProcessInfo actual = vss.CreateLabelProcessInfo(label, dateTime); ! string expectedArgs = @"label $/fooProject -LtestLabel -Vd04/15/2003;11:12 -YAdmin,admin -I-Y"; AssertNotNull("process was null", actual); --- 115,124 ---- public void CreateLabelProcess() { ! string oldLabel = "oldLabel"; ! string newLabel = "newLabel"; ! ProcessInfo actual = vss.CreateLabelProcessInfo(newLabel, oldLabel); ! string expectedArgs = @"label $/fooProject -LnewLabel -VLoldLabel -YAdmin,admin -I-Y"; AssertNotNull("process was null", actual); *************** *** 199,203 **** vss.Project = "$/Refactoring"; vss.Username = "orogers"; ! vss.Password = ""; vss.WorkingDirectory = @"c:\source\"; vss.SsDir = @"..\tools\vss"; --- 199,203 ---- vss.Project = "$/Refactoring"; vss.Username = "orogers"; ! vss.Password = string.Empty; vss.WorkingDirectory = @"c:\source\"; vss.SsDir = @"..\tools\vss"; |
|
From: Garrett M. S. <gm...@us...> - 2004-06-28 01:08:24
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16618/project/core/sourcecontrol Modified Files: Vss.cs Log Message: Fixed bug CCNET-71. http://jira.public.thoughtworks.org/browse/CCNET-71 Index: Vss.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/Vss.cs,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** Vss.cs 27 Jun 2004 09:31:50 -0000 1.25 --- Vss.cs 28 Jun 2004 01:08:15 -0000 1.26 *************** *** 5,8 **** --- 5,11 ---- using ThoughtWorks.CruiseControl.Core.Util; + // TODO remove + using System.Threading; + namespace ThoughtWorks.CruiseControl.Core.Sourcecontrol { *************** *** 21,25 **** internal static readonly string HISTORY_COMMAND_FORMAT = @"history {0} -R -Vd{1}~{2} -Y{3},{4} -I-Y"; internal static readonly string GET_COMMAND_FORMAT = @"get {0} -R -Vd{1} -Y{2},{3} -I-N"; ! internal static readonly string LABEL_COMMAND_FORMAT = @"label {0} -L{1} -Vd{2} -Y{3},{4} -I-Y"; internal static readonly string LABEL_COMMAND_FORMAT_NOTIMESTAMP = @"label {0} -L{1} -Y{2},{3} -I-Y"; --- 24,28 ---- internal static readonly string HISTORY_COMMAND_FORMAT = @"history {0} -R -Vd{1}~{2} -Y{3},{4} -I-Y"; internal static readonly string GET_COMMAND_FORMAT = @"get {0} -R -Vd{1} -Y{2},{3} -I-N"; ! internal static readonly string LABEL_COMMAND_FORMAT = @"label {0} -L{1} -VL{2} -Y{3},{4} -I-Y"; internal static readonly string LABEL_COMMAND_FORMAT_NOTIMESTAMP = @"label {0} -L{1} -Y{2},{3} -I-Y"; *************** *** 91,103 **** } ! public override void LabelSourceControl(string label, DateTime timeStamp) { if ( ApplyLabel ) { ! Execute(CreateLabelProcessInfo(label, timeStamp)); _lastTempLabel = null; } } public void CreateTemporaryLabel() { --- 94,111 ---- } ! public override void LabelSourceControl(string newLabel, DateTime dateTime) { if ( ApplyLabel ) { ! LabelSourceControl(newLabel, _lastTempLabel); _lastTempLabel = null; } } + public void LabelSourceControl(string newLabel, string oldLabel) + { + Execute(CreateLabelProcessInfo(newLabel, oldLabel)); + } + public void CreateTemporaryLabel() { *************** *** 128,134 **** } ! public ProcessInfo CreateLabelProcessInfo(string label, DateTime timeStamp) { ! return CreateProcessInfo(string.Format(LABEL_COMMAND_FORMAT, Project, label, FormatCommandDate(timeStamp), Username, Password)); } --- 136,142 ---- } ! public ProcessInfo CreateLabelProcessInfo(string label, string oldLabel) { ! return CreateProcessInfo(string.Format(LABEL_COMMAND_FORMAT, Project, label, oldLabel, Username, Password)); } *************** *** 203,207 **** private void DeleteLatestLabel() { ! LabelSourceControl( "", DateTime.Now ); } --- 211,215 ---- private void DeleteLatestLabel() { ! LabelSourceControl( string.Empty, _lastTempLabel ); } |
|
From: Owen R. <exo...@us...> - 2004-06-27 12:57:13
|
Update of /cvsroot/ccnet/ccnet/project/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20856/project/core Modified Files: IProject.cs ProjectIntegrator.cs core.csproj Log Message: fixed bug in DailySchedule. refactored ForceBuild out of Schedule classes Index: ProjectIntegrator.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/ProjectIntegrator.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ProjectIntegrator.cs 22 Apr 2004 12:02:03 -0000 1.10 --- ProjectIntegrator.cs 27 Jun 2004 12:57:00 -0000 1.11 *************** *** 12,16 **** /// <list type="1"> /// <item>The <see cref="ISchedule"/> instance is asked whether to build or not.</item> ! /// <item>If a build is required, the <see cref="IProject.RunIntegration()"/> /// is called.</item> /// </list> --- 12,16 ---- /// <list type="1"> /// <item>The <see cref="ISchedule"/> instance is asked whether to build or not.</item> ! /// <item>If a build is required, the <see cref="IProject.RunIntegration(BuildCondition buildCondition)"/> /// is called.</item> /// </list> *************** *** 20,23 **** --- 20,24 ---- private ISchedule _schedule; private IProject _project; + private bool _forceBuild; private Thread _thread; private ProjectIntegratorState _state = ProjectIntegratorState.Stopped; *************** *** 76,87 **** } - /// <summary> - /// TODO: move force build functionality into project integrator - /// </summary> public void ForceBuild() { Log.Info("Force Build for project: " + _project.Name); Start(); - ((Schedules.Schedule)_schedule).ForceBuild(); } --- 77,85 ---- } public void ForceBuild() { Log.Info("Force Build for project: " + _project.Name); + _forceBuild = true; Start(); } *************** *** 96,105 **** { // should we integrate this pass? ! BuildCondition buildCondition = _schedule.ShouldRunIntegration(); if (buildCondition != BuildCondition.NoBuild) { try { ! IntegrationResult result = _project.RunIntegration(buildCondition); } catch (Exception ex) --- 94,103 ---- { // should we integrate this pass? ! BuildCondition buildCondition = ShouldRunIntegration(); if (buildCondition != BuildCondition.NoBuild) { try { ! _project.RunIntegration(buildCondition); } catch (Exception ex) *************** *** 124,127 **** --- 122,135 ---- } + private BuildCondition ShouldRunIntegration() + { + if (_forceBuild) + { + _forceBuild = false; + return BuildCondition.ForceBuild; + } + return _schedule.ShouldRunIntegration(); + } + /// <summary> /// Gets a value indicating whether this project integrator is running *************** *** 134,138 **** /// <summary> ! /// Sets the scheduler's state to <see cref="Stopping"/>, telling the scheduler to /// stop at the next possible point in time. /// </summary> --- 142,146 ---- /// <summary> ! /// Sets the scheduler's state to <see cref="ProjectIntegratorState.Stopping"/>, telling the scheduler to /// stop at the next possible point in time. /// </summary> Index: IProject.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/IProject.cs,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** IProject.cs 7 Apr 2004 09:40:36 -0000 1.11 --- IProject.cs 27 Jun 2004 12:57:00 -0000 1.12 *************** *** 1,4 **** - using System; - using System.Collections; using ThoughtWorks.CruiseControl.Remote; --- 1,2 ---- Index: core.csproj =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/core.csproj,v retrieving revision 1.61 retrieving revision 1.62 diff -C2 -d -r1.61 -r1.62 *** core.csproj 23 Jun 2004 05:19:22 -0000 1.61 --- core.csproj 27 Jun 2004 12:57:00 -0000 1.62 *************** *** 1069,1072 **** --- 1069,1077 ---- /> <File + RelPath = "util\DateTimeProvider.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "util\DateUtil.cs" SubType = "Code" |
|
From: Owen R. <exo...@us...> - 2004-06-27 12:57:13
|
Update of /cvsroot/ccnet/ccnet/project/core/schedule In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20856/project/core/schedule Modified Files: DailySchedule.cs Schedule.cs Log Message: fixed bug in DailySchedule. refactored ForceBuild out of Schedule classes Index: DailySchedule.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/schedule/DailySchedule.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DailySchedule.cs 21 Jan 2004 14:43:09 -0000 1.1 --- DailySchedule.cs 27 Jun 2004 12:57:00 -0000 1.2 *************** *** 3,6 **** --- 3,7 ---- using System.Globalization; using ThoughtWorks.CruiseControl.Core.Config; + using ThoughtWorks.CruiseControl.Core.Util; using ThoughtWorks.CruiseControl.Remote; *************** *** 10,16 **** --- 11,25 ---- public class DailySchedule : ISchedule { + private DateTimeProvider _dtProvider; private TimeSpan _integrationTime; private DateTime _nextIntegration; + public DailySchedule() : this(new DateTimeProvider()) {} + + public DailySchedule(DateTimeProvider dtProvider) + { + _dtProvider = dtProvider; + } + [ReflectorProperty("integrationTime")] public string IntegrationTime *************** *** 22,26 **** { _integrationTime = TimeSpan.Parse(value); ! SetNextIntegration(); } catch (Exception ex) --- 31,35 ---- { _integrationTime = TimeSpan.Parse(value); ! SetNextIntegrationDateTime(); } catch (Exception ex) *************** *** 32,39 **** } ! private void SetNextIntegration() { ! DateTime now = Now; _nextIntegration = new DateTime(now.Year, now.Month, now.Day, _integrationTime.Hours, _integrationTime.Minutes, 0, 0); } --- 41,52 ---- } ! private void SetNextIntegrationDateTime() { ! DateTime now = _dtProvider.Now; _nextIntegration = new DateTime(now.Year, now.Month, now.Day, _integrationTime.Hours, _integrationTime.Minutes, 0, 0); + if (now >= _nextIntegration) + { + _nextIntegration = _nextIntegration.AddDays(1); + } } *************** *** 43,58 **** } - public void ForceBuild() - { - - } - public void IntegrationCompleted() { } public BuildCondition ShouldRunIntegration() { ! if (Now > _nextIntegration) { return BuildCondition.IfModificationExists; --- 56,67 ---- } public void IntegrationCompleted() { + SetNextIntegrationDateTime(); } public BuildCondition ShouldRunIntegration() { ! if (_dtProvider.Now > _nextIntegration) { return BuildCondition.IfModificationExists; *************** *** 60,68 **** return BuildCondition.NoBuild; } - - protected virtual DateTime Now - { - get { return DateTime.Now; } - } } } --- 69,72 ---- Index: Schedule.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/schedule/Schedule.cs,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Schedule.cs 11 Nov 2003 22:02:02 -0000 1.6 --- Schedule.cs 27 Jun 2004 12:57:00 -0000 1.7 *************** *** 1,4 **** --- 1,5 ---- using System; using Exortech.NetReflector; + using ThoughtWorks.CruiseControl.Core.Util; using ThoughtWorks.CruiseControl.Remote; *************** *** 12,27 **** public const int DefaultTimeOut = 60; - private double _timeOut = DefaultTimeOut; - private int _totalIterations = Infinite; private int _iterationsSoFar = 0; - private bool _forceNextBuild = false; private DateTime _lastIntegrationCompleteTime = DateTime.MinValue; ! public Schedule() { } ! ! public Schedule(int timeout, int totalIterations) { ! _timeOut = timeout; ! _totalIterations = totalIterations; } --- 13,27 ---- public const int DefaultTimeOut = 60; private int _iterationsSoFar = 0; private DateTime _lastIntegrationCompleteTime = DateTime.MinValue; + private DateTimeProvider _dtProvider; ! public Schedule() : this(new DateTimeProvider()) { } ! public Schedule(DateTimeProvider dtProvider) : this(dtProvider, DefaultTimeOut, Infinite) { } ! public Schedule(DateTimeProvider dtProvider, int timeout, int totalIterations) { ! _dtProvider = dtProvider; ! SleepSeconds = timeout; ! TotalIterations = totalIterations; } *************** *** 31,39 **** /// </summary> [ReflectorProperty("sleepSeconds")] ! public double SleepSeconds ! { ! get { return _timeOut; } ! set { _timeOut = value ; } ! } /// <summary> --- 31,35 ---- /// </summary> [ReflectorProperty("sleepSeconds")] ! public double SleepSeconds = DefaultTimeOut; /// <summary> *************** *** 43,56 **** /// </summary> [ReflectorProperty("iterations", Required=false)] ! public int TotalIterations ! { ! get { return _totalIterations; } ! set { _totalIterations = value; } ! } public void IntegrationCompleted() { _iterationsSoFar++; ! _lastIntegrationCompleteTime = DateTime.Now; } --- 39,48 ---- /// </summary> [ReflectorProperty("iterations", Required=false)] ! public int TotalIterations = Infinite; public void IntegrationCompleted() { _iterationsSoFar++; ! _lastIntegrationCompleteTime = _dtProvider.Now; } *************** *** 60,70 **** return BuildCondition.NoBuild; ! if (_forceNextBuild) ! { ! _forceNextBuild = false; ! return BuildCondition.ForceBuild; ! } ! ! TimeSpan timeSinceLastBuild = DateTime.Now - _lastIntegrationCompleteTime; if (timeSinceLastBuild.TotalSeconds < SleepSeconds) return BuildCondition.NoBuild; --- 52,56 ---- return BuildCondition.NoBuild; ! TimeSpan timeSinceLastBuild = _dtProvider.Now - _lastIntegrationCompleteTime; if (timeSinceLastBuild.TotalSeconds < SleepSeconds) return BuildCondition.NoBuild; *************** *** 75,88 **** public bool ShouldStopIntegration() { ! return (_totalIterations != Infinite && _iterationsSoFar >= _totalIterations); ! } ! ! /// <summary> ! /// Forces <see cref="ShouldRunIntegration"/> to return true on its next ! /// invocation, regardless of the time since the previous build, etc... ! /// </summary> ! public void ForceBuild() ! { ! _forceNextBuild = true; } --- 61,65 ---- public bool ShouldStopIntegration() { ! return (TotalIterations != Infinite && _iterationsSoFar >= TotalIterations); } |
|
From: Owen R. <exo...@us...> - 2004-06-27 12:57:13
|
Update of /cvsroot/ccnet/ccnet/project/core/schedule/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20856/project/core/schedule/test Modified Files: DailyScheduleTest.cs ScheduleTest.cs Log Message: fixed bug in DailySchedule. refactored ForceBuild out of Schedule classes Index: DailyScheduleTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/schedule/test/DailyScheduleTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DailyScheduleTest.cs 21 Jan 2004 14:43:09 -0000 1.1 --- DailyScheduleTest.cs 27 Jun 2004 12:57:00 -0000 1.2 *************** *** 1,5 **** --- 1,7 ---- using Exortech.NetReflector; + using NMock; using NUnit.Framework; using System; + using ThoughtWorks.CruiseControl.Core.Util; using ThoughtWorks.CruiseControl.Remote; using ThoughtWorks.CruiseControl.Core.Config; *************** *** 10,13 **** --- 12,31 ---- public class DailyScheduleTest : Assertion { + private IMock _mockDateTime; + private DailySchedule _schedule; + + [SetUp] + public void CreateSchedule() + { + _mockDateTime = new DynamicMock(typeof(DateTimeProvider)); + _schedule = new DailySchedule((DateTimeProvider) _mockDateTime.MockInstance); + } + + [TearDown] + public void VerifyMocks() + { + _mockDateTime.Verify(); + } + [Test] public void PopulateFromConfiguration() *************** *** 26,37 **** public void ShouldRunIntegrationIfCalendarTimeIsAfterIntegrationTime() { ! DailyScheduleExtension schedule = new DailyScheduleExtension(); ! schedule.now = new DateTime(2004, 1, 1, 23, 25, 0, 0); ! ! schedule.IntegrationTime = "23:30"; ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); ! schedule.now = new DateTime(2004, 1, 1, 23, 31, 0, 0); ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); } --- 44,53 ---- public void ShouldRunIntegrationIfCalendarTimeIsAfterIntegrationTime() { ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 23, 25, 0, 0)); ! _schedule.IntegrationTime = "23:30"; ! AssertEquals(BuildCondition.NoBuild, _schedule.ShouldRunIntegration()); ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 23, 31, 0, 0)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); } *************** *** 39,54 **** public void ShouldRunIntegrationOnTheNextDay() { ! DailyScheduleExtension schedule = new DailyScheduleExtension(); ! schedule.now = new DateTime(2004, 1, 1, 23, 25, 0, 0); ! schedule.IntegrationTime = "23:30"; ! schedule.now = new DateTime(2004, 1, 2, 1, 1, 0, 0); ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); } ! class DailyScheduleExtension : DailySchedule { ! public DateTime now; ! protected override DateTime Now { get { return now; } } } } --- 55,78 ---- public void ShouldRunIntegrationOnTheNextDay() { ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 23, 25, 0, 0)); ! _schedule.IntegrationTime = "23:30"; ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 2, 1, 1, 0, 0)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); } ! [Test] ! public void ShouldIncrementTheIntegrationTimeToTheNextDayAfterIntegrationIsCompleted() { ! _mockDateTime.SetupResult("Now", new DateTime(2004, 6, 27, 13, 00, 0, 0)); ! _schedule.IntegrationTime = "14:30"; ! _mockDateTime.SetupResult("Now", new DateTime(2004, 6, 27, 15, 00, 0, 0)); ! ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); ! _schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, _schedule.ShouldRunIntegration()); ! ! _mockDateTime.SetupResult("Now", new DateTime(2004, 6, 28, 15, 00, 0, 0)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); } } Index: ScheduleTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/schedule/test/ScheduleTest.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ScheduleTest.cs 5 Nov 2003 13:47:21 -0000 1.4 --- ScheduleTest.cs 27 Jun 2004 12:57:00 -0000 1.5 *************** *** 1,12 **** using System; - using System.Xml; - using System.Reflection; - using System.Threading; - using Exortech.NetReflector; using NUnit.Framework; - - using ThoughtWorks.CruiseControl.Remote; using ThoughtWorks.CruiseControl.Core.Util; namespace ThoughtWorks.CruiseControl.Core.Schedules.Test --- 1,8 ---- using System; using Exortech.NetReflector; + using NMock; using NUnit.Framework; using ThoughtWorks.CruiseControl.Core.Util; + using ThoughtWorks.CruiseControl.Remote; namespace ThoughtWorks.CruiseControl.Core.Schedules.Test *************** *** 15,18 **** --- 11,30 ---- public class ScheduleTest : CustomAssertion { + private IMock _mockDateTime; + private Schedule _schedule; + + [SetUp] + public void CreateSchedule() + { + _mockDateTime = new DynamicMock(typeof(DateTimeProvider)); + _schedule = new Schedule((DateTimeProvider) _mockDateTime.MockInstance); + } + + [TearDown] + public void VerifyMocks() + { + _mockDateTime.Verify(); + } + [Test] public void PopulateFromReflector() *************** *** 25,70 **** [Test] ! public void ForceBuild() { ! Schedule schedule = new Schedule(); ! schedule.SleepSeconds = 10; // longer than this test (ignore) ! ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); ! schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); ! ! schedule.ForceBuild(); ! AssertEquals(BuildCondition.ForceBuild, schedule.ShouldRunIntegration()); ! schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); ! ! schedule.ForceBuild(); ! schedule.ForceBuild(); ! AssertEquals(BuildCondition.ForceBuild, schedule.ShouldRunIntegration()); ! schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); ! } ! [Test] ! public void ShouldRunIntegration_SleepTime() ! { ! Schedule schedule = new Schedule(); ! schedule.SleepSeconds = 1; ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); ! schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); ! Thread.Sleep(750); // still before 1sec ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); // sleep beyond the 1sec mark ! Thread.Sleep(500); ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); ! schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); } --- 37,62 ---- [Test] ! public void VerifyThatShouldRunIntegrationAfterOneSecond() { ! _schedule.SleepSeconds = 10; ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 0, 0)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); ! _schedule.IntegrationCompleted(); ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 5, 0)); // 5 seconds later ! AssertEquals(BuildCondition.NoBuild, _schedule.ShouldRunIntegration()); ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 9, 0)); // 4 seconds later // still before 1sec ! AssertEquals(BuildCondition.NoBuild, _schedule.ShouldRunIntegration()); // sleep beyond the 1sec mark ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 14, 0)); // 5 seconds later ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); ! _schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, _schedule.ShouldRunIntegration()); } *************** *** 72,95 **** public void ShouldRunIntegration_SleepsFromEndOfIntegration() { ! Schedule schedule = new Schedule(); ! schedule.SleepSeconds = 0.5; ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); ! Thread.Sleep(550); ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); ! schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); ! Thread.Sleep(550); ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); ! schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration()); ! Thread.Sleep(550); ! AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration()); } --- 64,87 ---- public void ShouldRunIntegration_SleepsFromEndOfIntegration() { ! _schedule.SleepSeconds = 0.5; ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 0, 0)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 0, 550)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); ! _schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, _schedule.ShouldRunIntegration()); ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 1, 50)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); ! _schedule.IntegrationCompleted(); ! AssertEquals(BuildCondition.NoBuild, _schedule.ShouldRunIntegration()); ! _mockDateTime.SetupResult("Now", new DateTime(2004, 1, 1, 1, 0, 1, 550)); ! AssertEquals(BuildCondition.IfModificationExists, _schedule.ShouldRunIntegration()); } |
|
From: Owen R. <exo...@us...> - 2004-06-27 12:57:13
|
Update of /cvsroot/ccnet/ccnet/project/core/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20856/project/core/test Modified Files: ProjectIntegratorTest.cs Log Message: fixed bug in DailySchedule. refactored ForceBuild out of Schedule classes Index: ProjectIntegratorTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/test/ProjectIntegratorTest.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ProjectIntegratorTest.cs 23 Jun 2004 05:19:23 -0000 1.9 --- ProjectIntegratorTest.cs 27 Jun 2004 12:57:00 -0000 1.10 *************** *** 16,20 **** [SetUp] ! protected void SetUp() { _project = new MockProject("mock", null); --- 16,20 ---- [SetUp] ! public void SetUp() { _project = new MockProject("mock", null); *************** *** 22,26 **** [TearDown] ! protected void TearDown() { if (_integrator != null) --- 22,26 ---- [TearDown] ! public void TearDown() { if (_integrator != null) *************** *** 197,201 **** public void Abort() { ! _schedule = new Schedule(1, Schedule.Infinite); _integrator = new ProjectIntegrator(_schedule, _project); _integrator.Start(); --- 197,201 ---- public void Abort() { ! _schedule = new Schedule(new DateTimeProvider(), 1, Schedule.Infinite); _integrator = new ProjectIntegrator(_schedule, _project); _integrator.Start(); *************** *** 209,213 **** public void TerminateWhenProjectIsntStarted() { ! _schedule = new Schedule(1, Schedule.Infinite); _integrator = new ProjectIntegrator(_schedule, _project); _integrator.Abort(); --- 209,213 ---- public void TerminateWhenProjectIsntStarted() { ! _schedule = new Schedule(new DateTimeProvider(),1, Schedule.Infinite); _integrator = new ProjectIntegrator(_schedule, _project); _integrator.Abort(); *************** *** 218,222 **** public void TerminateCalledTwice() { ! _schedule = new Schedule(1, Schedule.Infinite); _integrator = new ProjectIntegrator(_schedule, _project); _integrator.Start(); --- 218,222 ---- public void TerminateCalledTwice() { ! _schedule = new Schedule(new DateTimeProvider(),1, Schedule.Infinite); _integrator = new ProjectIntegrator(_schedule, _project); _integrator.Start(); *************** *** 245,249 **** private ProjectIntegrator CreateProjectIntegrator(int iterations, int timeout) { ! _schedule = new Schedule(timeout, iterations); return new ProjectIntegrator(_schedule, _project); } --- 245,249 ---- private ProjectIntegrator CreateProjectIntegrator(int iterations, int timeout) { ! _schedule = new Schedule(new DateTimeProvider(), timeout, iterations); return new ProjectIntegrator(_schedule, _project); } |
|
From: Owen R. <exo...@us...> - 2004-06-27 12:57:13
|
Update of /cvsroot/ccnet/ccnet/project/Remote In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20856/project/Remote Modified Files: ISchedule.cs Log Message: fixed bug in DailySchedule. refactored ForceBuild out of Schedule classes Index: ISchedule.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/Remote/ISchedule.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ISchedule.cs 11 Feb 2004 07:01:20 -0000 1.3 --- ISchedule.cs 27 Jun 2004 12:57:00 -0000 1.4 *************** *** 33,42 **** /// </summary> void IntegrationCompleted(); - - /// <summary> - /// Tells the scheduler that an integration should occur the next - /// time <see cref="ShouldRunIntegration"/> is called. - /// </summary> - // void ForceBuild(); } } --- 33,36 ---- |
|
From: Owen R. <exo...@us...> - 2004-06-27 12:57:12
|
Update of /cvsroot/ccnet/ccnet/project/core/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20856/project/core/util Added Files: DateTimeProvider.cs Log Message: fixed bug in DailySchedule. refactored ForceBuild out of Schedule classes --- NEW FILE: DateTimeProvider.cs --- using System; namespace ThoughtWorks.CruiseControl.Core.Util { public class DateTimeProvider { public virtual DateTime Now { get { return DateTime.Now; } } } } |
|
From: Owen R. <exo...@us...> - 2004-06-27 11:32:09
|
Update of /cvsroot/ccnet/ccnet/project/core/publishers In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7150/project/core/publishers Modified Files: EmailPublisher.cs Log Message: fixing issue ccnet-21 Index: EmailPublisher.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/publishers/EmailPublisher.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** EmailPublisher.cs 3 May 2004 13:21:30 -0000 1.15 --- EmailPublisher.cs 27 Jun 2004 11:32:00 -0000 1.16 *************** *** 106,109 **** --- 106,110 ---- public EmailUser GetEmailUser(string username) { + if (username == null) return null; return (EmailUser) _users[username]; } |
|
From: Owen R. <exo...@us...> - 2004-06-27 11:32:09
|
Update of /cvsroot/ccnet/ccnet/project/core/publishers/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7150/project/core/publishers/test Modified Files: EmailPublisherTest.cs Log Message: fixing issue ccnet-21 Index: EmailPublisherTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/publishers/test/EmailPublisherTest.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** EmailPublisherTest.cs 7 Apr 2004 09:40:37 -0000 1.14 --- EmailPublisherTest.cs 27 Jun 2004 11:32:00 -0000 1.15 *************** *** 154,157 **** --- 154,168 ---- [Test] + public void CreateModifiersListWithUnspecifiedUser() + { + Modification[] modifications = new Modification[1]; + modifications[0] = new Modification(); + modifications[0].UserName = null; + + string[] modifiers = _publisher.CreateModifiersList(modifications); + AssertEquals("expected 0 modifier", 0, modifiers.Length); + } + + [Test] public void CreateNotifyList() { |
|
From: Owen R. <exo...@us...> - 2004-06-27 11:19:06
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29669/project/core/sourcecontrol/test Modified Files: VssHistoryParserTest.cs Log Message: fixing issue ccnet-118 Index: VssHistoryParserTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test/VssHistoryParserTest.cs,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** VssHistoryParserTest.cs 13 Jun 2004 14:46:25 -0000 1.10 --- VssHistoryParserTest.cs 27 Jun 2004 11:18:57 -0000 1.11 *************** *** 203,207 **** } - [Test] public void ParseFileAndFolderWithNoComment() --- 203,206 ---- *************** *** 239,242 **** --- 238,259 ---- [Test] + public void ParseFileAndFolderIfFolderIsCalledAdded() + { + string entry = @"***** added ***** + Version 8 + User: Admin Date: 9/16/02 Time: 5:29p + happyTheFile.txt added + "; + string expectedFile = "happyTheFile.txt"; + string expectedFolder = "added"; + + Modification mod = ParseAndAssertFilenameAndFolder(entry, expectedFile, expectedFolder); + AssertEquals("Admin", mod.UserName); + AssertEquals(new DateTime(2002, 9, 16, 17, 29, 0), mod.ModifiedTime); + AssertEquals("added", mod.Type); + AssertEquals(null, mod.Comment); + } + + [Test] public void ParseFileAndFolder_deleteFromSubfolder() { |
|
From: Owen R. <exo...@us...> - 2004-06-27 11:19:06
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29669/project/core/sourcecontrol Modified Files: VssHistoryParser.cs Log Message: fixing issue ccnet-118 Index: VssHistoryParser.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/VssHistoryParser.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** VssHistoryParser.cs 13 Jun 2004 14:46:25 -0000 1.13 --- VssHistoryParser.cs 27 Jun 2004 11:18:57 -0000 1.14 *************** *** 90,111 **** public static VSSParser CreateParser(string entry, IVssLocale locale) { ! int commentIndex = entry.IndexOf(locale.CommentKeyword); ! commentIndex = commentIndex > -1 ? commentIndex : entry.Length; ! string nonCommentEntry = entry.Substring(0, commentIndex); ! if (nonCommentEntry.IndexOf(locale.CheckedInKeyword) > -1) { return new CheckInParser(entry, locale); } ! else if (nonCommentEntry.IndexOf(locale.AddedKeyword) > -1) { return new AddedParser(entry, locale); } ! else if (nonCommentEntry.IndexOf(locale.DeletedKeyword) > -1) return new DeletedParser(entry, locale); ! else if (nonCommentEntry.IndexOf(locale.DestroyedKeyword) > -1) return new DestroyedParser(entry, locale); return new NullParser(entry, locale); } } --- 90,118 ---- public static VSSParser CreateParser(string entry, IVssLocale locale) { ! string vssKeyworkdLine = ReadVSSKeywordLine(entry); ! if (vssKeyworkdLine.IndexOf(locale.CheckedInKeyword) > -1) { return new CheckInParser(entry, locale); } ! else if (vssKeyworkdLine.IndexOf(locale.AddedKeyword) > -1) { return new AddedParser(entry, locale); } ! else if (vssKeyworkdLine.IndexOf(locale.DeletedKeyword) > -1) return new DeletedParser(entry, locale); ! else if (vssKeyworkdLine.IndexOf(locale.DestroyedKeyword) > -1) return new DestroyedParser(entry, locale); return new NullParser(entry, locale); } + + private static string ReadVSSKeywordLine(string entry) + { + StringReader reader = new StringReader(entry); + reader.ReadLine(); + reader.ReadLine(); + string nonCommentEntry = reader.ReadLine() + Environment.NewLine + reader.ReadLine(); + return nonCommentEntry; + } } |
|
From: Owen R. <exo...@us...> - 2004-06-27 11:19:06
|
Update of /cvsroot/ccnet/ccnet/project/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29669/project/web Modified Files: web.csproj Log Message: fixing issue ccnet-118 Index: web.csproj =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/web.csproj,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** web.csproj 23 Jun 2004 05:19:24 -0000 1.26 --- web.csproj 27 Jun 2004 11:18:57 -0000 1.27 *************** *** 136,139 **** --- 136,144 ---- HintPath = "..\..\lib\nmock.dll" /> + <Reference + Name = "System.Data" + AssemblyName = "System.Data" + HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" + /> </References> </Build> |
|
From: Owen R. <exo...@us...> - 2004-06-27 09:31:59
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13420/project/core/sourcecontrol/test Modified Files: VssTest.cs Log Message: culture can now be configured for vss source control Index: VssTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test/VssTest.cs,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** VssTest.cs 13 Jun 2004 16:03:35 -0000 1.27 --- VssTest.cs 27 Jun 2004 09:31:50 -0000 1.28 *************** *** 1,6 **** #define USE_MOCK - using System; - using System.Globalization; using System.IO; using Exortech.NetReflector; --- 1,4 ---- *************** *** 8,13 **** using NMock.Constraints; using NUnit.Framework; - using ThoughtWorks.CruiseControl.Core.Util; using ThoughtWorks.CruiseControl.Core.Test; namespace ThoughtWorks.CruiseControl.Core.Sourcecontrol.Test --- 6,11 ---- using NMock.Constraints; using NUnit.Framework; using ThoughtWorks.CruiseControl.Core.Test; + using ThoughtWorks.CruiseControl.Core.Util; namespace ThoughtWorks.CruiseControl.Core.Sourcecontrol.Test *************** *** 27,30 **** --- 25,29 ---- <timeout>5</timeout> <workingDirectory>C:\temp</workingDirectory> + <culture>fr-FR</culture> </sourceControl>"; *************** *** 34,38 **** [SetUp] ! protected void SetUp() { mockProcessExecutor = new DynamicMock(typeof(ProcessExecutor)); mockProcessExecutor.Strict = true; --- 33,37 ---- [SetUp] ! public void SetUp() { mockProcessExecutor = new DynamicMock(typeof(ProcessExecutor)); mockProcessExecutor.Strict = true; *************** *** 40,45 **** mockRegistry.SetupResult("GetExpectedLocalMachineSubKeyValue", DEFAULT_SS_EXE_PATH, typeof(string), typeof(string)); vss = new Vss(new VssHistoryParser(new EnglishVssLocale()), (ProcessExecutor) mockProcessExecutor.MockInstance, (IRegistry) mockRegistry.MockInstance); - vss.CultureInfo = CultureInfo.InvariantCulture; vss.Project = "$/fooProject"; vss.Username = "Admin"; vss.Password = "admin"; --- 39,44 ---- mockRegistry.SetupResult("GetExpectedLocalMachineSubKeyValue", DEFAULT_SS_EXE_PATH, typeof(string), typeof(string)); vss = new Vss(new VssHistoryParser(new EnglishVssLocale()), (ProcessExecutor) mockProcessExecutor.MockInstance, (IRegistry) mockRegistry.MockInstance); vss.Project = "$/fooProject"; + vss.Culture = string.Empty; // invariant culture vss.Username = "Admin"; vss.Password = "admin"; *************** *** 47,51 **** [TearDown] ! protected void TearDown() { mockProcessExecutor.Verify(); --- 46,50 ---- [TearDown] ! public void TearDown() { mockProcessExecutor.Verify(); *************** *** 81,84 **** --- 80,84 ---- AssertEquals(true, vss.AutoGetSource); AssertEquals(@"C:\temp", vss.WorkingDirectory); + AssertEquals("fr-FR", vss.Culture); } *************** *** 100,104 **** public void FormatDateInUSFormat() { ! vss.CultureInfo = new CultureInfo("en-US"); DateTime date = new DateTime(2002, 2, 22, 20, 0, 0); string expected = "2/22/2002;8:00P"; --- 100,104 ---- public void FormatDateInUSFormat() { ! vss.Culture = "en-US"; DateTime date = new DateTime(2002, 2, 22, 20, 0, 0); string expected = "2/22/2002;8:00P"; |
|
From: Owen R. <exo...@us...> - 2004-06-27 09:31:59
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13420/project/core/sourcecontrol Modified Files: Vss.cs Log Message: culture can now be configured for vss source control Index: Vss.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/Vss.cs,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** Vss.cs 13 Jun 2004 16:03:35 -0000 1.24 --- Vss.cs 27 Jun 2004 09:31:50 -0000 1.25 *************** *** 28,33 **** private string _executable; private string _lastTempLabel; ! ! public CultureInfo CultureInfo = CultureInfo.CurrentCulture; public Vss(): this(new VssHistoryParser(VssLocaleFactory.Create()), new ProcessExecutor(), new Registry()) --- 28,32 ---- private string _executable; private string _lastTempLabel; ! private CultureInfo _cultureInfo = CultureInfo.CurrentCulture; public Vss(): this(new VssHistoryParser(VssLocaleFactory.Create()), new ProcessExecutor(), new Registry()) *************** *** 80,83 **** --- 79,89 ---- public string WorkingDirectory; + [ReflectorProperty("culture", Required = false)] + public string Culture + { + get { return _cultureInfo.Name; } + set { _cultureInfo = new CultureInfo(value); } + } + public override Modification[] GetModifications(DateTime from, DateTime to) { *************** *** 151,155 **** internal string FormatCommandDate(DateTime date) { ! return string.Concat(date.ToString("d", CultureInfo), ";", date.ToString("t", CultureInfo)).Replace(" ", string.Empty).TrimEnd('M', 'm'); } --- 157,161 ---- internal string FormatCommandDate(DateTime date) { ! return string.Concat(date.ToString("d", _cultureInfo), ";", date.ToString("t", _cultureInfo)).Replace(" ", string.Empty).TrimEnd('M', 'm'); } |
|
From: Hsue-Shen T. <st...@us...> - 2004-06-24 07:09:59
|
Update of /cvsroot/ccnet/ccnet/project/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8900/project/web Modified Files: Coverage.aspx.cs Log Message: Fixed problem in loading xsl Index: Coverage.aspx.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/Coverage.aspx.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Coverage.aspx.cs 23 Jun 2004 05:19:24 -0000 1.2 --- Coverage.aspx.cs 24 Jun 2004 07:09:50 -0000 1.3 *************** *** 13,17 **** private void Page_Load(object sender, EventArgs e) { ! BodyArea.InnerHtml = new PageTransformer(WebUtil.ResolveLogFile(Context),"Ncover.xsl").LoadPageContent(); } --- 13,18 ---- private void Page_Load(object sender, EventArgs e) { ! string xslFilename = WebUtil.GetXslFilename("Ncover.xsl", Request); ! BodyArea.InnerHtml = new PageTransformer(WebUtil.ResolveLogFile(Context), xslFilename).LoadPageContent(); } |
|
From: Hsue-Shen T. <st...@us...> - 2004-06-24 07:06:06
|
Update of /cvsroot/ccnet/ccnet/project/web/xsl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8261/project/web/xsl Added Files: NCover.xsl Log Message: Added missing ncover.xsl for coverage.aspx plugin --- NEW FILE: NCover.xsl --- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/strict"> <xsl:output method="html"/> <xsl:template match="/"> <xsl:apply-templates select="//coverage" /> </xsl:template> <xsl:template match="coverage"> <html> <head> <title>Code Coverage Report</title> </head> <body> <div style="font-size: 12pt; font-weight: bold;">Code Coverage Report</div> <p/> <xsl:apply-templates select="module"/> </body> </html> </xsl:template> <xsl:template match="module"> <div style="font-size: 10pt"> <xsl:value-of select="@assembly"/> </div> <p/> <xsl:apply-templates select="method"/> </xsl:template> <xsl:template match="method"> <div style="color: maroon; font-size: 10pt; font-weight: bold;"> <xsl:value-of select="@class"/>.<xsl:value-of select="@name"/> </div> <table border="1" cellpadding="3" cellspacing="0" bordercolor="black"> <tr> <td bgcolor="DDEEFF">Visit Count</td> <td bgcolor="DDEEFF">Line</td> <td bgcolor="DDEEFF">Column</td> <td bgcolor="DDEEFF">End Line</td> <td bgcolor="DDEEFF">End Column</td> <td bgcolor="DDEEFF">Document</td> </tr> <xsl:apply-templates select="seqpnt"/> </table> <p/> </xsl:template> <xsl:template match="seqpnt"> <tr> <td bgcolor="#FFFFEE"> <xsl:attribute name="bgcolor"> <xsl:choose> <xsl:when test="@visitcount = 0">#FFCCCC</xsl:when> <xsl:otherwise>#FFFFEE</xsl:otherwise> </xsl:choose> </xsl:attribute> <xsl:value-of select="@visitcount"/> </td> <td bgcolor="#FFFFEE"> <xsl:value-of select="@line"/> </td> <td bgcolor="#FFFFEE"> <xsl:value-of select="@column"/> </td> <td bgcolor="#FFFFEE"> <xsl:value-of select="@endline"/> </td> <td bgcolor="#FFFFEE"> <xsl:value-of select="@endcolumn"/> </td> <td bgcolor="#FFFFEE"> <xsl:value-of select="@document"/> </td> </tr> </xsl:template> </xsl:stylesheet> |
|
From: Owen R. <exo...@us...> - 2004-06-23 05:19:32
|
Update of /cvsroot/ccnet/ccnet/project/web In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8570/project/web Modified Files: Coverage.aspx.cs Decorator.aspx.cs ServerLog.aspx.cs Statistics.aspx.cs Web.config web.csproj Log Message: ensuring that remoting channels are closed and that the remote object is disconnected optimised usings upgrading nmock Index: Decorator.aspx.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/Decorator.aspx.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Decorator.aspx.cs 11 May 2004 11:53:20 -0000 1.8 --- Decorator.aspx.cs 23 Jun 2004 05:19:24 -0000 1.9 *************** *** 2,19 **** using System.Collections; using System.Configuration; - using System.ComponentModel; - using System.Data; - using System.Drawing; using System.Text; - using System.Web; - using System.Web.SessionState; using System.Web.UI; - using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; using ThoughtWorks.CruiseControl.Core; namespace ThoughtWorks.CruiseControl.Web { ! public class Decorator : System.Web.UI.Page { protected DataList menu; --- 2,15 ---- using System.Collections; using System.Configuration; using System.Text; using System.Web.UI; using System.Web.UI.HtmlControls; + using System.Web.UI.WebControls; + using SiteMesh.DecoratorControls; using ThoughtWorks.CruiseControl.Core; namespace ThoughtWorks.CruiseControl.Web { ! public class Decorator : Page { protected DataList menu; *************** *** 22,33 **** protected HtmlAnchor nextLog; protected HtmlAnchor previousLog; ! protected SiteMesh.DecoratorControls.Title Title1; ! protected SiteMesh.DecoratorControls.Body Body1; ! protected SiteMesh.DecoratorControls.GetProperty prop1; ! protected System.Web.UI.HtmlControls.HtmlTableCell Td2; ! protected SiteMesh.DecoratorControls.Title Title3; ! protected System.Web.UI.HtmlControls.HtmlTableCell contentCell; ! private void Page_Load(object sender, System.EventArgs e) { string path = WebUtil.GetLogDirectory(Context).FullName; --- 18,29 ---- protected HtmlAnchor nextLog; protected HtmlAnchor previousLog; ! protected Title Title1; ! protected Body Body1; ! protected GetProperty prop1; ! protected HtmlTableCell Td2; ! protected Title Title3; ! protected HtmlTableCell contentCell; ! private void Page_Load(object sender, EventArgs e) { string path = WebUtil.GetLogDirectory(Context).FullName; *************** *** 113,118 **** private void InitializeComponent() { ! this.menu.ItemDataBound += new System.Web.UI.WebControls.DataListItemEventHandler(this.DataList_BindItem); ! this.Load += new System.EventHandler(this.Page_Load); } --- 109,114 ---- private void InitializeComponent() { ! this.menu.ItemDataBound += new DataListItemEventHandler(this.DataList_BindItem); ! this.Load += new EventHandler(this.Page_Load); } Index: Coverage.aspx.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/Coverage.aspx.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Coverage.aspx.cs 10 May 2004 12:01:47 -0000 1.1 --- Coverage.aspx.cs 23 Jun 2004 05:19:24 -0000 1.2 *************** *** 1,27 **** using System; - using System.Collections; - using System.Configuration; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.IO; - using System.Text; - using System.Web; - using System.Web.SessionState; using System.Web.UI; - using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; ! ! using ThoughtWorks.CruiseControl.Core; ! using ThoughtWorks.CruiseControl.Util; namespace ThoughtWorks.CruiseControl.Web { ! public class Coverage : System.Web.UI.Page { ! protected System.Web.UI.WebControls.Label results; protected HtmlGenericControl BodyArea; ! private void Page_Load(object sender, System.EventArgs e) { BodyArea.InnerHtml = new PageTransformer(WebUtil.ResolveLogFile(Context),"Ncover.xsl").LoadPageContent(); --- 1,15 ---- using System; using System.Web.UI; using System.Web.UI.HtmlControls; ! using System.Web.UI.WebControls; namespace ThoughtWorks.CruiseControl.Web { ! public class Coverage : Page { ! protected Label results; protected HtmlGenericControl BodyArea; ! private void Page_Load(object sender, EventArgs e) { BodyArea.InnerHtml = new PageTransformer(WebUtil.ResolveLogFile(Context),"Ncover.xsl").LoadPageContent(); *************** *** 37,41 **** private void InitializeComponent() { ! this.Load += new System.EventHandler(this.Page_Load); } --- 25,29 ---- private void InitializeComponent() { ! this.Load += new EventHandler(this.Page_Load); } Index: Statistics.aspx.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/Statistics.aspx.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Statistics.aspx.cs 1 Nov 2003 18:53:21 -0000 1.4 --- Statistics.aspx.cs 23 Jun 2004 05:19:24 -0000 1.5 *************** *** 1,23 **** using System; - using System.Collections; - using System.Configuration; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.Text; - using System.Web; - using System.Web.SessionState; using System.Web.UI; using System.Web.UI.WebControls; - using System.Web.UI.HtmlControls; using ThoughtWorks.CruiseControl.Core; namespace ThoughtWorks.CruiseControl.Web { ! public class Statistics : System.Web.UI.Page { ! protected System.Web.UI.WebControls.Label BodyLabel; ! private void Page_Load(object sender, System.EventArgs e) { try --- 1,14 ---- using System; using System.Web.UI; using System.Web.UI.WebControls; using ThoughtWorks.CruiseControl.Core; namespace ThoughtWorks.CruiseControl.Web { ! public class Statistics : Page { ! protected Label BodyLabel; ! private void Page_Load(object sender, EventArgs e) { try *************** *** 51,55 **** private void InitializeComponent() { ! this.Load += new System.EventHandler(this.Page_Load); } --- 42,46 ---- private void InitializeComponent() { ! this.Load += new EventHandler(this.Page_Load); } Index: ServerLog.aspx.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/ServerLog.aspx.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ServerLog.aspx.cs 8 Apr 2004 04:56:56 -0000 1.3 --- ServerLog.aspx.cs 23 Jun 2004 05:19:24 -0000 1.4 *************** *** 1,25 **** using System; - using System.Collections; using System.Configuration; - using System.ComponentModel; - using System.Data; - using System.Drawing; - using System.IO; - using System.Text; - using System.Web; - using System.Web.SessionState; using System.Web.UI; - using System.Web.UI.WebControls; using System.Web.UI.HtmlControls; - using System.Xml; - using ThoughtWorks.CruiseControl.Core; namespace ThoughtWorks.CruiseControl.Web { ! public class ServerLog : System.Web.UI.Page { protected HtmlTableCell LogData; ! private void Page_Load(object sender, System.EventArgs e) { string serverLogFilename = GetServerLogFilenameFromConfig(); --- 1,14 ---- using System; using System.Configuration; using System.Web.UI; using System.Web.UI.HtmlControls; namespace ThoughtWorks.CruiseControl.Web { ! public class ServerLog : Page { protected HtmlTableCell LogData; ! private void Page_Load(object sender, EventArgs e) { string serverLogFilename = GetServerLogFilenameFromConfig(); *************** *** 54,58 **** private void InitializeComponent() { ! this.Load += new System.EventHandler(this.Page_Load); } --- 43,47 ---- private void InitializeComponent() { ! this.Load += new EventHandler(this.Page_Load); } Index: Web.config =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/Web.config,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Web.config 30 May 2004 19:29:54 -0000 1.19 --- Web.config 23 Jun 2004 05:19:24 -0000 1.20 *************** *** 63,73 **** <globalization requestEncoding="utf-8" responseEncoding="utf-8" /> </system.web> - <system.runtime.remoting> - <application> - <channels> - <channel ref="tcp" port="1234" /> - </channels> - </application> - </system.runtime.remoting> <appSettings> <add key="logDir" value="log" /> --- 63,66 ---- Index: web.csproj =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/web/web.csproj,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** web.csproj 11 May 2004 12:18:19 -0000 1.25 --- web.csproj 23 Jun 2004 05:19:24 -0000 1.26 *************** *** 91,99 **** /> <Reference - Name = "System.Data" - AssemblyName = "System.Data" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" - /> - <Reference Name = "System.XML" AssemblyName = "System.Xml" --- 91,94 ---- *************** *** 116,124 **** /> <Reference - Name = "System.Runtime.Remoting" - AssemblyName = "System.Runtime.Remoting" - HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Runtime.Remoting.dll" - /> - <Reference Name = "core" Project = "{F8113DB9-6C47-4FD1-8A01-655FCF151747}" --- 111,114 ---- |
|
From: Owen R. <exo...@us...> - 2004-06-23 05:19:32
|
Update of /cvsroot/ccnet/ccnet/project/core/util/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8570/project/core/util/test Modified Files: ProcessInfoTest.cs Log Message: ensuring that remoting channels are closed and that the remote object is disconnected optimised usings upgrading nmock Index: ProcessInfoTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/util/test/ProcessInfoTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ProcessInfoTest.cs 10 May 2004 22:38:30 -0000 1.1 --- ProcessInfoTest.cs 23 Jun 2004 05:19:24 -0000 1.2 *************** *** 4,8 **** using ThoughtWorks.CruiseControl.Core.Util; ! namespace ThoughtWorks.CruiseControl.Core.util.test { [TestFixture] --- 4,8 ---- using ThoughtWorks.CruiseControl.Core.Util; ! namespace ThoughtWorks.CruiseControl.Core.Util.Test { [TestFixture] |
|
From: Owen R. <exo...@us...> - 2004-06-23 05:19:32
|
Update of /cvsroot/ccnet/ccnet/project/core/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8570/project/core/test Modified Files: ProjectIntegratorTest.cs Added Files: RemoteCruiseServerTest.cs Log Message: ensuring that remoting channels are closed and that the remote object is disconnected optimised usings upgrading nmock Index: ProjectIntegratorTest.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/test/ProjectIntegratorTest.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ProjectIntegratorTest.cs 11 Feb 2004 07:01:37 -0000 1.8 --- ProjectIntegratorTest.cs 23 Jun 2004 05:19:23 -0000 1.9 *************** *** 1,8 **** using System; using System.Diagnostics; using System.Threading; - - using NUnit.Framework; - using ThoughtWorks.CruiseControl.Core.Schedules; using ThoughtWorks.CruiseControl.Core.Util; --- 1,6 ---- + using NUnit.Framework; using System; using System.Diagnostics; using System.Threading; using ThoughtWorks.CruiseControl.Core.Schedules; using ThoughtWorks.CruiseControl.Core.Util; --- NEW FILE: RemoteCruiseServerTest.cs --- using System; using System.Runtime.Remoting; using System.Runtime.Remoting.Channels; using NMock; using NMock.Remoting; using NUnit.Framework; using ThoughtWorks.CruiseControl.Core.Util; using ThoughtWorks.CruiseControl.Remote; namespace ThoughtWorks.CruiseControl.Core.Test { [TestFixture] public class RemoteCruiseServerTest : Assertion { [SetUp] public void SetUp() { foreach (IChannel channel in ChannelServices.RegisteredChannels) { ChannelServices.UnregisterChannel(channel); } } [TearDown] public void DeleteTempFiles() { TempFileUtil.DeleteTempDir("RemoteCruiseServerTest"); } [Test] public void SetupAndTeardownRemotingInfrastructure() { string configXml = @"<configuration> <system.runtime.remoting> <application> <channels> <channel ref=""tcp"" port=""35354"" name=""ccnet""> <serverProviders> <formatter ref=""binary"" typeFilterLevel=""Full"" /> </serverProviders> </channel> <channel ref=""http"" port=""35355"" name=""ccnet2""> <serverProviders> <formatter ref=""binary"" typeFilterLevel=""Full"" /> </serverProviders> </channel> </channels> </application> </system.runtime.remoting> </configuration>"; AssertEquals("no registered channels should be open.", 0, ChannelServices.RegisteredChannels.Length); TempFileUtil.CreateTempDir("RemoteCruiseServerTest"); string configFile = TempFileUtil.CreateTempXmlFile("RemoteCruiseServerTest", "remote.config", configXml); IMock mockCruiseManager = new RemotingMock(typeof(ICruiseManager)); IMock mockCruiseServer = new DynamicMock(typeof(ICruiseServer)); mockCruiseServer.ExpectAndReturn("CruiseManager", mockCruiseManager.MockInstance); mockCruiseServer.ExpectAndReturn("CruiseManager", mockCruiseManager.MockInstance); using(RemoteCruiseServer server = new RemoteCruiseServer((ICruiseServer) mockCruiseServer.MockInstance, configFile)) { AssertEquals(2, ChannelServices.RegisteredChannels.Length); AssertNotNull("ccnet channel is missing", ChannelServices.GetChannel("ccnet")); AssertNotNull("ccnet2 channel is missing", ChannelServices.GetChannel("ccnet2")); ICruiseManager remoteManager = (ICruiseManager) RemotingServices.Connect(typeof(ICruiseManager), "tcp://localhost:35354/" + RemoteCruiseServer.URI); AssertNotNull("cruiseserver should be registered on tcp channel", remoteManager); remoteManager = (ICruiseManager) RemotingServices.Connect(typeof(ICruiseManager), "http://localhost:35355/" + RemoteCruiseServer.URI); AssertNotNull("cruiseserver should be registered on http channel", remoteManager); } AssertEquals("all registered channels should be closed.", 0, ChannelServices.RegisteredChannels.Length); } } } |
|
From: Owen R. <exo...@us...> - 2004-06-23 05:19:32
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8570/project/core/sourcecontrol Modified Files: Pvcs.cs Log Message: ensuring that remoting channels are closed and that the remote object is disconnected optimised usings upgrading nmock Index: Pvcs.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/Pvcs.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Pvcs.cs 2 Jun 2004 20:37:46 -0000 1.13 --- Pvcs.cs 23 Jun 2004 05:19:23 -0000 1.14 *************** *** 24,33 **** @"run -e vlog ""-xo+e{0}"" ""-d{1}*{2}"" ""@{3}"" "; - // const string INSTRUCTIONS_TEMPLATE = @"set -vProject ""{0}"" - //set -vSubProject ""{1}"" - //run ->{2} listversionedfiles -z -aw $Project $SubProject - //run -e vlog ""-xo+e{3}"" ""-d{4}*{5}"" ""@{2}"" - //"; - private TimeZone _currentTimeZone = TimeZone.CurrentTimeZone; --- 24,27 ---- *************** *** 42,48 **** public string Arguments = COMMAND; - // [ReflectorProperty("instructions", Required=false)] - // public string Instructions = INSTRUCTIONS_TEMPLATE; - [ReflectorProperty("project")] public string Project; --- 36,39 ---- |