Beispiel #1
0
        public void Execute_ShortWithTimeout_SqlException()
        {
            var etl = new EtlXml()
            {
                Server  = ConnectionStringReader.GetIntegrationServer(),
                Catalog = "SSISDB",
                Folder  = "Demo.NBi.Ssis",
                Project = "Demo.NBi.Ssis.Integration",
                Name    = "Dimensions.dtsx",
                Timeout = 1
            };

            etl.InternalParameters.Add(new EtlParameterXml()
            {
                Name = "FlatFileScientist", StringValue = $@"{AssemblyDirectory}\data\DimScientist.csv"
            });
            etl.InternalParameters.Add(new EtlParameterXml()
            {
                Name = "FlatFileGeography", StringValue = $@"{AssemblyDirectory}\data\DimGeography.csv"
            });
            etl.InternalParameters.Add(new EtlParameterXml()
            {
                Name = "ConnectionString", StringValue = ConnectionStringReader.GetIntegrationServerTargetDatabase()
            });

            var runner = new EtlCatalogRunner(etl);

            Assert.Throws <SqlException>(() => runner.Execute());
        }
Beispiel #2
0
        public void Execute_WithoutTimeout_CorrectlyHandled()
        {
            var etl = new EtlXml()
            {
                Server  = ConnectionStringReader.GetIntegrationServer(),
                Catalog = "SSISDB",
                Folder  = "Demo.NBi.Ssis",
                Project = "Demo.NBi.Ssis.Integration",
                Name    = "Dimensions.dtsx",
            };

            etl.InternalParameters.Add(new EtlParameterXml()
            {
                Name = "FlatFileScientist", StringValue = $@"{AssemblyDirectory}\data\DimScientist.csv"
            });
            etl.InternalParameters.Add(new EtlParameterXml()
            {
                Name = "FlatFileGeography", StringValue = $@"{AssemblyDirectory}\data\DimGeography.csv"
            });
            etl.InternalParameters.Add(new EtlParameterXml()
            {
                Name = "ConnectionString", StringValue = ConnectionStringReader.GetIntegrationServerTargetDatabase()
            });

            var runner = new EtlCatalogRunner(etl);

            runner.Execute();
        }