Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/13/10 16:09:22 (14 years ago)
Author:
cneumuel
Message:

#1233

  • fixed config merge process
  • worked on hive server test setup
Location:
branches/HeuristicLab.Hive-3.4/sources
Files:
7 added
2 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources

    • Property svn:ignore
      •  

        old new  
        11HeuristicLab.Hive-3.4.suo
        22TestResults
         3HeuristicLab.Hive 3.4.suo
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ExperimentManager/PluginClient.cs

    r5055 r5095  
    55using HeuristicLab.Services.Hive.Common.DataTransfer;
    66
    7 namespace HeuristicLab.Clients.Hive.HiveExperiment {
     7namespace HeuristicLab.Clients.Hive {
    88  internal class PluginClient {
    99
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests

    • Property svn:ignore set to
      bin
      obj
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/HeuristicLab.Services.Hive.Tests-3.4.csproj

    r5078 r5095  
    307307  </ItemGroup>
    308308  <ItemGroup>
     309    <Compile Include="Mocks\MockAuthorizationManager.cs" />
     310    <Compile Include="Mocks\MockLifecycleManager.cs" />
     311    <Compile Include="Mocks\MockServiceLocator.cs" />
    309312    <Compile Include="PluginLoader.cs" />
    310313    <Compile Include="Properties\AssemblyInfo.cs" />
     
    312315  </ItemGroup>
    313316  <ItemGroup>
     317    <ProjectReference Include="..\HeuristicLab.Clients.Hive.Slave.Tests\HeuristicLab.Clients.Hive.Slave.Tests-3.4.csproj">
     318      <Project>{C4CBD11E-1B83-464A-B0AD-0DC0FF7E57AA}</Project>
     319      <Name>HeuristicLab.Clients.Hive.Slave.Tests-3.4</Name>
     320    </ProjectReference>
     321    <ProjectReference Include="..\HeuristicLab.Clients.Hive\3.4\HeuristicLab.Clients.Hive-3.4.csproj">
     322      <Project>{B5EF1E5A-9F3D-40B9-B4B0-30AADF2E2CEB}</Project>
     323      <Name>HeuristicLab.Clients.Hive-3.4</Name>
     324    </ProjectReference>
    314325    <ProjectReference Include="..\HeuristicLab.Hive\3.4\HeuristicLab.Hive-3.4.csproj">
    315326      <Project>{F98A1740-9AC9-4D36-A582-6A2D0D06978D}</Project>
     
    330341  </ItemGroup>
    331342  <ItemGroup>
    332     <Folder Include="Mocks\" />
     343    <None Include="HeuristicLab 3.3.exe.config">
     344      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     345    </None>
    333346  </ItemGroup>
    334347  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServerTest.cs

    r5078 r5095  
    44using System.Linq;
    55using Microsoft.VisualStudio.TestTools.UnitTesting;
     6using HeuristicLab.Services.Hive.Common.DataTransfer;
     7using HeuristicLab.Services.Hive.Common.ServiceContracts;
     8using HeuristicLab.Clients.Hive.Slave.Tests;
     9using HeuristicLab.Clients.Hive;
    610
    711namespace HeuristicLab.Services.Hive.Tests {
     
    1216    public static void MyClassInitialize(TestContext testContext) {
    1317      PluginLoader.pluginAssemblies.Any();
     18      ServiceLocator.Instance = new MockServiceLocator(ServiceLocator.Instance);
     19    }
     20   
     21    private IHiveService GetService() {
     22      return new HiveService();
    1423    }
    1524
    1625    [TestMethod]
    1726    public void TestMethod1() {
     27      var service = GetService();
     28
     29      Job job = new Job() {
     30        CoresNeeded = 1,
     31        MemoryNeeded = 0,
     32        Priority = 0
     33      };
     34
     35      JobData jobData = new JobData() {
     36        Data = PersistenceUtil.Serialize(new MockJob(500))
     37      };
     38
     39      Guid jobId = service.AddJob(job, jobData);
     40
     41      Job newJob = service.GetJob(jobId);
     42      Assert.AreEqual(job, newJob);
    1843    }
    1944  }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Web

    • Property svn:ignore set to
      aspnet_client
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeuristicLab.Services.Hive-3.4.csproj

    r5055 r5095  
    7878    <None Include="HeuristicLabServicesHivePlugin.cs.frame" />
    7979    <None Include="Properties\AssemblyInfo.cs.frame" />
     80    <Compile Include="Interfaces\ILifecycleManager.cs" />
     81    <Compile Include="Interfaces\IServiceLocator.cs" />
    8082    <Compile Include="Standalone\HeuristicLabServicesHiveApplication.cs" />
    8183    <Compile Include="Standalone\MainForm.cs">
     
    8789    <Compile Include="AuthorizationManager.cs" />
    8890    <Compile Include="HeuristicLabServicesHivePlugin.cs" />
    89     <Compile Include="Hive.cs" />
     91    <Compile Include="LifecycleManager.cs" />
    9092    <Compile Include="HiveRoles.cs" />
    9193    <Compile Include="HiveService.cs" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs

    r5078 r5095  
    1717  /// Implementation of the Hive service (interface <see cref="IHiveService"/>).
    1818  /// </summary>
     19  [ServiceBehavior(InstanceContextMode=InstanceContextMode.PerCall)]
    1920  public class HiveService : IHiveService {
    2021    private DataAccess.IHiveDao dao {
     
    2728      get { return ServiceLocator.Instance.AuthorizationManager; }
    2829    }
    29     private Hive hive {
    30       get { return ServiceLocator.Instance.Hive; }
     30    private ILifecycleManager lifecycleManager {
     31      get { return ServiceLocator.Instance.LifecycleManager; }
    3132    }
    3233
    3334    #region Job Methods
    34     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
    35     [PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
     35    //[PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Administrator)]
     36    //[PrincipalPermission(SecurityAction.Demand, Role = HiveRoles.Client)]
    3637    public Guid AddJob(Job job, JobData jobData) {
    3738      using (trans.OpenTransaction()) {
     
    176177    public List<MessageContainer> Heartbeat(Heartbeat heartbeat) {
    177178      using (trans.OpenTransaction()) {
    178         return hive.ProcessHeartbeat(heartbeat);
     179        return lifecycleManager.ProcessHeartbeat(heartbeat);
    179180      }
    180181    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/ServiceLocator.cs

    r5028 r5095  
    77namespace HeuristicLab.Services.Hive {
    88
    9   public class ServiceLocator {
    10     private static ServiceLocator instance;
    11     public static ServiceLocator Instance {
     9  public class ServiceLocator : IServiceLocator {
     10    private static IServiceLocator instance;
     11    public static IServiceLocator Instance {
    1212      get {
    1313        if (instance == null) instance = new ServiceLocator();
    1414        return instance;
    1515      }
     16      set { instance = value; }
    1617    }
    1718
     
    4041    }
    4142
    42     private Hive hive;
    43     public Hive Hive {
     43    private ILifecycleManager lifecycleManager;
     44    public ILifecycleManager LifecycleManager {
    4445      get {
    45         if (hive == null) hive = new Hive();
    46         return hive;
     46        if (lifecycleManager == null) lifecycleManager = new LifecycleManager();
     47        return lifecycleManager;
    4748      }
    4849    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/Standalone/HeuristicLabServicesHiveApplication.cs

    r5040 r5095  
    1212  public class HeuristicLabServicesHiveApplication : ApplicationBase {
    1313    private IDictionary<string, ServiceHost> serviceHosts = new Dictionary<string, ServiceHost>();
    14     private Hive hive { get { return ServiceLocator.Instance.Hive; } }
     14    private ILifecycleManager lifecycleManager { get { return ServiceLocator.Instance.LifecycleManager; } }
    1515
    1616    public override void Run() {
     
    2525            host.Close();
    2626        }
    27         hive.Shutdown();
     27        lifecycleManager.Stop();
    2828      }
    2929    }
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/app.config

    r5078 r5095  
    5757    </behaviors>
    5858    <services>
    59       <service behaviorConfiguration="ServiceBehaviour_IHiveService"
    60         name="HeuristicLab.Services.Hive.HiveService">
     59      <service behaviorConfiguration="ServiceBehaviour_IHiveService" name="HeuristicLab.Services.Hive.HiveService">
    6160        <endpoint address="mex" binding="mexHttpBinding" bindingConfiguration="" name="MexEndpoint" contract="IMetadataExchange" />
    6261        <endpoint binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IHiveService" name="WSHttpBinding_IHiveService" contract="HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService" />
  • branches/HeuristicLab.Hive-3.4/sources/MergeConfigs.cmd

    r5050 r5095  
    1 copy "%SolutionDir%HeuristicLab.Hive-3.3.dll.config" "%TargetDir%"
     1copy "%SolutionDir%HeuristicLab.Hive 3.4.dll.config" "%TargetDir%"
    22
    3 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive\3.3\app.config" "%TargetDir%HeuristicLab.Hive-3.3.dll.config"
    4 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive.DataAccess\3.3\app.config" "%TargetDir%HeuristicLab.Hive-3.3.dll.config"
    5 %SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Clients.Hive\3.3\app.config" "%TargetDir%HeuristicLab.Hive-3.3.dll.config"
     3%SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive\3.4\app.config" "%TargetDir%HeuristicLab.Hive 3.4.dll.config"
     4%SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Services.Hive.DataAccess\3.4\app.config" "%TargetDir%HeuristicLab.Hive 3.4.dll.config"
     5%SolutionDir%ConfigMerger "%SolutionDir%HeuristicLab.Clients.Hive\3.4\app.config" "%TargetDir%HeuristicLab.Hive 3.4.dll.config"
    66
    77copy "%SolutionDir%HeuristicLab 3.3.exe.config" "%TargetDir%"
    88
    9 %SolutionDir%ConfigMerger "%TargetDir%HeuristicLab.Hive-3.3.dll.config" "%TargetDir%HeuristicLab 3.3.exe.config"
    10 copy "%TargetDir%HeuristicLab 3.3.exe.config" "asdf.config"
     9%SolutionDir%ConfigMerger "%TargetDir%HeuristicLab.Hive 3.4.dll.config" "%TargetDir%HeuristicLab 3.3.exe.config"
    1110copy "%TargetDir%HeuristicLab 3.3.exe.config" "%target%"
Note: See TracChangeset for help on using the changeset viewer.