use of org.apache.ignite.resources.JobContextResource in project ignite by apache.
the class GridClosureSerializationTest method testAttributesSerializationFailure.
/**
* @throws Exception If failed.
*/
@SuppressWarnings({ "ThrowableResultOfMethodCallIgnored", "Convert2Lambda" })
public void testAttributesSerializationFailure() throws Exception {
final IgniteEx ignite0 = grid(0);
final IgniteEx ignite1 = grid(1);
GridTestUtils.assertThrows(null, new Callable<Object>() {
@JobContextResource
private ComputeJobContext jobCtx;
@Override
public Object call() throws Exception {
ignite1.compute(ignite1.cluster().forNode(ignite0.localNode())).call(new IgniteCallable<Object>() {
@Override
public Object call() throws Exception {
jobCtx.setAttribute("test-attr", new BrokenAttribute());
return null;
}
});
return null;
}
}, IgniteException.class, null);
}
Aggregations