mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
Install JNI within context of unit test framework's signal handler
This commit is contained in:
parent
7f1dd75086
commit
c68bc1589b
@ -82,14 +82,13 @@ int main( int argc, char** argv ) {
|
||||
srand( seed );
|
||||
out() << "random seed: " << seed << endl;
|
||||
|
||||
// NOTE Starting JNI changes global state (for example, locale and FPU precision);
|
||||
// make sure we test with this setup.
|
||||
JavaJS = new JavaJSImpl();
|
||||
|
||||
UnitTest::Registry tests;
|
||||
|
||||
tests.add( btreeTests(), "btree" );
|
||||
// NOTE Starting JNI changes global state (for example, locale and FPU precision);
|
||||
// make sure all tests run with this setup, by running javajs tests first.
|
||||
tests.add( javajsTests(), "javajs" );
|
||||
|
||||
tests.add( btreeTests(), "btree" );
|
||||
tests.add( jsobjTests(), "jsobj" );
|
||||
tests.add( jsonTests(), "json" );
|
||||
tests.add( matcherTests(), "matcher" );
|
||||
|
@ -26,6 +26,11 @@ namespace JavaJSTests {
|
||||
class Fundamental {
|
||||
public:
|
||||
void run() {
|
||||
// By calling JavaJSImpl() inside run(), we ensure the unit test framework's
|
||||
// signal handlers are pre-installed from JNI's perspective. This allows
|
||||
// JNI to catch signals generated within the JVM and forward other signals
|
||||
// as appropriate.
|
||||
JavaJS = new JavaJSImpl();
|
||||
javajstest();
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user