Skip to content

Fix configuration schema forbidding custom bytecode provider #1764

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

Merged

Conversation

fredericDelaporte
Copy link
Member

No description provided.

@@ -35,6 +35,23 @@ public void FromAppConfigTest()
Assert.IsTrue(hc.UseReflectionOptimizer);
Assert.AreEqual("NHibernate.Test", hc.SessionFactory.Name);
}

[Test]
public void ByteCodeProvider()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test one above will fail.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand...

Copy link
Member Author

@fredericDelaporte fredericDelaporte Jun 21, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first test of the fixture still succeeds because the configuration is invalid by lack of session-factory node. That is not a schema validation error, but a hard-coded check in the parsing.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understood that later, but did not report it here. Can you rename that test to something more meaningful than InvalidConfig?

To be squashed.
@@ -13,7 +11,7 @@ namespace NHibernate.Test.CfgTest
public class ConfigurationSchemaFixture
{
[Test]
public void InvalidConfig()
public void ThrowIfSessionFactoryIsMissing()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking <session-factory /> element is not required. It is required only when config is loaded not from app.config I guess.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, but the name is already long enough I find. ThrowIfSessionFactoryIsMissingWhenNotFromAppConfig?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, something like that. Or, better: SessionFactoryIsRequiredWhenConfigurationIsLoadedNotFromAppConfig

To be squashed.
@fredericDelaporte fredericDelaporte merged commit 82f199e into nhibernate:master Jun 25, 2018
@fredericDelaporte fredericDelaporte deleted the bytecodeProviderSetting branch June 25, 2018 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants