Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to reference connection strings in setup and cleanup tasks #110

Closed
millusdk opened this issue Aug 19, 2015 · 10 comments
Closed

Unable to reference connection strings in setup and cleanup tasks #110

millusdk opened this issue Aug 19, 2015 · 10 comments

Comments

@millusdk
Copy link

When creating setup and cleanup tasks the connectionString must be specified explicitly, it is not possible to reference the ones created in the settings section using the @-notation.

@millusdk millusdk changed the title Unable to reference connection strings during setup and cleanup Unable to reference connection strings in setup and cleanup tasks Aug 19, 2015
@Seddryck Seddryck added the bug label Aug 19, 2015
@Seddryck
Copy link
Owner

I'll check this

@Seddryck
Copy link
Owner

Yes, indeed, I confirm the bug.

I've provided a fix at https://ci.appveyor.com/project/CdricLCharlier/nbi/build/1.11.0.99042

Could you confirm it's effectively fixing your issue? Thx.

@Seddryck Seddryck added this to the v1.11 milestone Aug 19, 2015
@millusdk
Copy link
Author

Thank you very much for your quick reply. Unfortunately it does not appear to solve the problem, here is the full error message:
NBi.NUnit.Runtime.TestSuite.Test case 6394 DS:
Exception during the setup of the test: Format of the initialization string does not conform to specification starting at index 0.
at System.Data.Common.DbConnectionOptions.GetKeyValuePair(String connectionString, Int32 currentPosition, StringBuilder buffer, Boolean useOdbcRules, String& keyname, String& keyvalue)
at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)
at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)
at System.Data.Common.DbConnectionStringBuilder.set_ConnectionString(String value)
at NBi.Core.ConnectionFactory.Get(String connectionString) in c:\projects\nbi\NBi.Core\ConnectionFactory.cs:line 18
at NBi.Core.Batch.BatchFactory.Get(IBatchCommand command) in c:\projects\nbi\NBi.Core\Batch\BatchFactory.cs:line 17
at NBi.Core.DecorationFactory.Get(IDecorationCommand command) in c:\projects\nbi\NBi.Core\DecorationFactory.cs:line 33
at NBi.Core.GroupCommand.Sequential() in c:\projects\nbi\NBi.Core\GroupCommand.cs:line 58
at NBi.Core.GroupCommand.Execute() in c:\projects\nbi\NBi.Core\GroupCommand.cs:line 26
at NBi.NUnit.Runtime.TestSuite.ExecuteSetup(SetupXml setup) in c:\projects\nbi\NBi.NUnit.Runtime\TestSuite.cs:line 106

And here is the spedification of the setup task:

@Seddryck
Copy link
Owner

Could you copy/paste your test and the settings? I have some troubles to reproduce.

@millusdk
Copy link
Author

Here is the settings section, I have removed the server and instance names and the other connection strings:
<settings>
...
<reference name="Opis">
<connectionString>Data Source=;Initial Catalog=Test_OPIS;Integrated Security=true;</connectionString>
</reference>
</settings>

The sql task looks as follows:
<sql-run name="6394-setup.sql" path="../NBi Test Suite /SQL/" connectionString="@opis" />

@Seddryck
Copy link
Owner

Ok, now I know where to check.

@millusdk
Copy link
Author

Sounds good. I really hope you are able to fix it :)

I don't know if it is possible, but it would also be cool if you could specify servers for etl runs the same way

-----Original Message-----
From: "Cédric L. Charlier" [email protected]
Sent: ‎20-‎08-‎2015 18:16
To: "Seddryck/NBi" [email protected]
Cc: "millusdk" [email protected]
Subject: Re: [NBi] Unable to reference connection strings in setup and cleanuptasks (#110)

Ok, now I know where to check.

Reply to this email directly or view it on GitHub.

@Seddryck
Copy link
Owner

First time, I had fixed the issue for table-reset and table-load ... now it's also fixed for sql-run ... available at https://ci.appveyor.com/project/CdricLCharlier/nbi/build/1.11.0.99045

@millusdk
Copy link
Author

Just ran my tests with the updated build and it is working :)
Thank you very much for the rapid help and fix

@Seddryck
Copy link
Owner

Ok, thx for feedback, I'll merge into the master branch and it will be part of release 1.11 (probably in a few days).

If you want that take a look to provider a tag etl into the tag reference, create a new issue and I'll take a look when I've time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants