IKANOW / Aleph2

The IKANOW v2 meta-database and analytics platform
Apache License 2.0
2 stars 1 forks source link

Test bucket handles malformed JSON really badly #57

Closed Alex-Ikanow closed 8 years ago

Alex-Ikanow commented 8 years ago

I get a long stream of messages like this in the log:

2015-11-12 17:37:20 [pool-13-thread-1] ERROR IkanowV1SyncService_TestBuckets:207 - [java.lang.RuntimeException: java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "library_ids_or_names" (class com.ikanow.aleph2.data_model.objects.data_analytics.AnalyticThreadJobBean), not marked as ignorable (14 known properties: "enabled", "output", "config", "entry_point", "analytic_technology_name_or_id", "dependencies", "inputs", "multi_node_enabled", "name", "analytic_type", "node_list_rules", "global_input_config" [truncated]])
 at [Source: N/A; line: -1, column: -1] (through reference chain: com.ikanow.aleph2.data_model.objects.data_import.DataBucketBean["analytic_thread"]->com.ikanow.aleph2.data_model.objects.data_analytics.AnalyticThreadBean["jobs"]->com.ikanow.aleph2.data_model.objects.data_analytics.AnalyticThreadJobBean["library_ids_or_names"]): ExecutionException]:[CompletableFuture.java:2237:java.util.concurrent.CompletableFuture:get][IkanowV1SyncService_TestBuckets.java:200:com.ikanow.aleph2.management_db.mongodb.services.IkanowV1SyncService_TestBuckets$SourceTestMonitor:run] ([java.lang.RuntimeException: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "library_ids_or_names" (class com.ikanow.aleph2.data_model.objects.data_analytics.AnalyticThreadJobBean), not marked as ignorable (14 known properties: "enabled", "output", "config", "entry_point", "analytic_technology_name_or_id", "dependencies", "inputs", "multi_node_enabled", "name", "analytic_type", "node_list_rules", "global_input_config" [truncated]])

but the test spins and no message is reported when it times out and fails

Looks from the stack trace like it happens really early on, so should be easy to send an error message and insta fail out the test no?