Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1816

Unit test rigs don't serialize parser/unparser - allows lazy evaluation during runtime.

XMLWordPrintableJSON

      See also DFDL-1814 about CompilerMode/RuntimeMode.

      Developer reports that debugging tests in daffodil-core-unittest results in mixtures of compilation lazy evaluation with runtime.

      These test rigs used for these unit tests do not serialize/unserialize the parser nor unparser before invoking them. It is the serialization that ultimately forces all the lazy evaluation that the compiler performs to be forced.

      In theory, these mixtures can only occur if nobody calls "isError" on the ProcessorFactory and then the DataProcessor objects, as that is supposed to cause all the requiredEvaluation(...) forms to evaluate, and that should force everything that is needed to insure the object is without error.

      In practice, not everything gets caught that way, and serialization of the parser/unparser runtime objects is the thing that ultimately forces everything (specifically the pre-serialization call).

      To fix this we need a synchronized method on Processor that keeps a local object state indicating that the processor has been serialized. If the object is serialized normally by way of call to save() then the local flag should be set. If not, then serializing the object to a /dev/null stream should occur so as to force all the lazy evaluation.

              Unassigned Unassigned
              mbeckerle.dfdl Mike Beckerle
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: