| 419 | } |
| 420 | |
| 421 | jobject createPromise(GenericPromise<bool>&& promise) { |
| 422 | auto p = std::make_unique<JavaPromise>(std::move(promise)); |
| 423 | auto clazz = getClass("com/apple/foundationdb/testing/Promise"); |
| 424 | auto res = env->NewObject(clazz, getMethod(clazz, "<init>", "(J)V"), reinterpret_cast<jlong>(p.get())); |
| 425 | checkException(); |
| 426 | p.release(); |
| 427 | return res; |
| 428 | } |
| 429 | |
| 430 | void shutdownWorkload(jobject workload, const std::string& workloadName) { |
| 431 | auto clazz = getClass(workloadName.c_str()); |