Repository navigation
Support higher maximum blob segment size (#1197) #1264
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| //$Authors = Jiri Cincura (jiri@cincura.net) | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| using System; | ||||||||||||||||||||||||||||||||||||||
| using System.Globalization; | ||||||||||||||||||||||||||||||||||||||
| using System.Threading; | ||||||||||||||||||||||||||||||||||||||
| using FirebirdSql.Data.Common; | ||||||||||||||||||||||||||||||||||||||
|
|
@@ -760,4 +761,61 @@ public void ParsingDatabaseHostnames(string hostname) | |||||||||||||||||||||||||||||||||||||
| Assert.AreEqual(hostname, cs.DataSource); | ||||||||||||||||||||||||||||||||||||||
| Assert.AreEqual("test.fdb", cs.Database); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| [Test] | ||||||||||||||||||||||||||||||||||||||
| public void BlobSegmentSizeDefault() | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| var cs = new ConnectionString(); | ||||||||||||||||||||||||||||||||||||||
| Assert.AreEqual(ConnectionString.DefaultValueBlobSegmentSize, cs.BlobSegmentSize); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| [Test] | ||||||||||||||||||||||||||||||||||||||
| public void BlobSegmentSizeParsing() | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| const string connStr = "datasource=testserver;database=testdb.fdb;user=testuser;password=testpwd;blob segment size=65535"; | ||||||||||||||||||||||||||||||||||||||
| var cs = new ConnectionString(connStr); | ||||||||||||||||||||||||||||||||||||||
| Assert.AreEqual(65535, cs.BlobSegmentSize); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| [Test] | ||||||||||||||||||||||||||||||||||||||
| public void BlobSegmentSizeParsingSynonym() | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| const string connStr = "datasource=testserver;database=testdb.fdb;user=testuser;password=testpwd;blobsegmentsize=32000"; | ||||||||||||||||||||||||||||||||||||||
| var cs = new ConnectionString(connStr); | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+783
to
+784
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Assert.AreEqual(32000, cs.BlobSegmentSize); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| [Test] | ||||||||||||||||||||||||||||||||||||||
| public void BlobSegmentSizeValidationTooSmall() | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| const string connStr = "datasource=testserver;database=testdb.fdb;user=testuser;password=testpwd;blob segment size=100"; | ||||||||||||||||||||||||||||||||||||||
| var cs = new ConnectionString(connStr); | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+791
to
+792
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Assert.Throws<ArgumentException>(() => cs.Validate()); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| [Test] | ||||||||||||||||||||||||||||||||||||||
| public void BlobSegmentSizeValidationTooLarge() | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| const string connStr = "datasource=testserver;database=testdb.fdb;user=testuser;password=testpwd;blob segment size=70000"; | ||||||||||||||||||||||||||||||||||||||
| var cs = new ConnectionString(connStr); | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+799
to
+800
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| Assert.Throws<ArgumentException>(() => cs.Validate()); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| [Test] | ||||||||||||||||||||||||||||||||||||||
| public void BlobSegmentSizeValidationMinBoundary() | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| const string connStr = "datasource=testserver;database=testdb.fdb;user=testuser;password=testpwd;blob segment size=512"; | ||||||||||||||||||||||||||||||||||||||
| var cs = new ConnectionString(connStr); | ||||||||||||||||||||||||||||||||||||||
| Assert.DoesNotThrow(() => cs.Validate()); | ||||||||||||||||||||||||||||||||||||||
| Assert.AreEqual(512, cs.BlobSegmentSize); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| [Test] | ||||||||||||||||||||||||||||||||||||||
| public void BlobSegmentSizeValidationMaxBoundary() | ||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||
| const string connStr = "datasource=testserver;database=testdb.fdb;user=testuser;password=testpwd;blob segment size=65535"; | ||||||||||||||||||||||||||||||||||||||
| var cs = new ConnectionString(connStr); | ||||||||||||||||||||||||||||||||||||||
| Assert.DoesNotThrow(() => cs.Validate()); | ||||||||||||||||||||||||||||||||||||||
| Assert.AreEqual(65535, cs.BlobSegmentSize); | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+803
to
+820
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this testing is too much. The the
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.