Embedded Server: TestDriver Breaking Changes
The features listed in this page were available in former RavenDB versions.
In RavenDB 6.2.x
, they are either unavailable or their behavior is inconsistent
with their behavior in previous versions.
- In this page:
Unlicensed TestDriver throws an exception
Background:
The RavenDB.TestDriver package allows users to create unit tests for their applications, and run the tests using an embedded server included in the package.
Like other types of RavenDB server, the features that an embedded server supports
and the resources it can use are defined by its license.
An unlicensed server, for example, can use only 3 CPU cores, while a server
licensed using a free developers license
can use up to 9 cores and run way faster.
-
When a RavenDB server starts, its license is validated.
- If the validation succeeds, the server will run and offer the capabilities defined by its license.
- If the validation fails, the server may still run but limit its capabilities to those
defined by the basic AGPL
license.
If the validation fails because the license expired, and the expiration date precedes the server build date, the server will not start at all.
-
A
TestServerOptions.Licensing.ThrowOnInvalidOrMissingLicense
configuration option is available since RavenDB5.4
, determining whether to throw aLicenseExpiredException
exception if TestDriver uses an unlicensed embedded server.- If
ThrowOnInvalidOrMissingLicense
is set totrue
and the validation fails, aLicenseExpiredException
exception will be thrown to warn TestDriver users that in lack of a valid license, their server's capabilities are limited and they may therefore miss out on much of their system's potential. - If the configuration option is set to
false
, no exception will be thrown even if a license cannot be validated.
- If
The breaking change:
Up until RavenDB version 6.0
, we set TestServerOptions.Licensing.ThrowOnInvalidOrMissingLicense
to false
by default, so no exception would be thrown even if license validation fails.
For an exception to be thrown, users needed to change the flag to true
on their own initiative.
In version 6.2
, the default value for this configuration option changed to true
;
a LicenseExpiredException
exception would be thrown if the embedded server used by
TestDriver fails to validate a license.
Users that prefer that no exception would be thrown if an unlicensed embedded server is
used, can set TestServerOptions.Licensing.ThrowOnInvalidOrMissingLicense
to false
.