Build a test jar which we can run to test the built jar is runnable
[ldk-java] / src / test / java / org / ldk / HumanObjectPeerTest.java
index bb3859d26582a2bdb105f0b082e800a6d4d91f3f..c6a6f475fbf969fbcb174e0e7f479f7de8d08f76 100644 (file)
@@ -897,4 +897,15 @@ public class HumanObjectPeerTest {
             do_test(nice_close, use_km_wrapper, use_manual_watch, reload_peers, break_cross_refs, nio_peer_handler, use_chan_manager_constructor);
         }
     }
+
+    // This is used in the test jar to test the built jar is runnable
+    public static void main(String[] args) {
+        try {
+            new HumanObjectPeerTest().test_message_handler();
+        } catch (Exception e) {
+            System.err.println("Caught exception:");
+            System.err.println(e);
+            System.exit(1);
+        }
+    }
 }