• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

HicServices / RDMP / 22060935925

16 Feb 2026 11:28AM UTC coverage: 57.174% (-0.002%) from 57.176%
22060935925

push

github

JFriel
fix server check

11509 of 21627 branches covered (53.22%)

Branch coverage included in aggregate %.

0 of 1 new or added line in 1 file covered. (0.0%)

32589 of 55503 relevant lines covered (58.72%)

8898.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/Rdmp.Core/DataLoad/Modules/Mutilators/RemoteServerSQLExecution.cs
1
using FAnsi.Discovery;
2
using Rdmp.Core.Curation.Data;
3
using Rdmp.Core.Curation.Data.DataLoad;
4
using Rdmp.Core.DataLoad.Engine.Job;
5
using Rdmp.Core.DataLoad.Engine.Mutilators;
6
using Rdmp.Core.ReusableLibraryCode.Checks;
7
using Rdmp.Core.ReusableLibraryCode.Progress;
8
using System;
9
using System.Collections.Generic;
10
using System.Linq;
11
using System.Text;
12
using System.Threading.Tasks;
13

14
namespace Rdmp.Core.DataLoad.Modules.Mutilators
15
{
16
    internal class RemoteServerSQLExecution : IPluginMutilateDataTables
17
    {
18

19
        [DemandsInitialization("The Remote Database server to run this sql on")]
20
        public ExternalDatabaseServer RemoteServer { get; set; }
×
21

22
        [DemandsInitialization("Run the following SQL when this component is run in the DLE", DemandType = DemandType.SQL,
23
    Mandatory = true)]
24
        public string Sql { get; set; }
×
25

26
        public void Check(ICheckNotifier notifier)
27
        {
NEW
28
            if (RemoteServer != null && !RemoteServer.Exists())
×
29
            {
30
                notifier.OnCheckPerformed(new CheckEventArgs("Remote Server unavailable", CheckResult.Fail));
×
31
            }
32
        }
×
33

34
        public void Initialize(DiscoveredDatabase dbInfo, LoadStage loadStage)
35
        {
36
        }
×
37

38
        public void LoadCompletedSoDispose(ExitCodeType exitCode, IDataLoadEventListener postLoadEventsListener)
39
        {
40
        }
×
41

42
        public ExitCodeType Mutilate(IDataLoadJob job)
43
        {
44
            var db = RemoteServer.Discover(ReusableLibraryCode.DataAccess.DataAccessContext.DataLoad);
×
45
            try
46
            {
47
                using (var conn = db.Server.GetConnection())
×
48
                {
49
                    conn.Open();
×
50
                    var cmd = db.Server.GetCommand(Sql, conn);
×
51
                    cmd.ExecuteNonQuery();
×
52
                }
×
53
            }
×
54
            catch (Exception e)
×
55
            {
56
                job.OnNotify(this, new NotifyEventArgs(ProgressEventType.Error, e.Message));
×
57
                return ExitCodeType.Error;
×
58
            }
59
            return ExitCodeType.Success;
×
60
        }
×
61
    }
62
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc