[jira] [Commented] (DAFFODIL-2302) TDML Runner remembers external variable bindings even on subsequent test suites that don't use them.

2020-03-30 Thread Mike Beckerle (Jira)


[ 
https://issues.apache.org/jira/browse/DAFFODIL-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071323#comment-17071323
 ] 

Mike Beckerle commented on DAFFODIL-2302:
-

PR https://github.com/apache/incubator-daffodil/pull/343

> TDML Runner remembers external variable bindings even on subsequent test 
> suites that don't use them.
> 
>
> Key: DAFFODIL-2302
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2302
> Project: Daffodil
>  Issue Type: Bug
>  Components: TDML Runner
>Affects Versions: 2.5.0
>Reporter: Mike Beckerle
>Assignee: Mike Beckerle
>Priority: Critical
> Fix For: 2.6.0
>
>
> A schema has two separate TDML test suites.
> The schema has an external variable that has a default value of 2.
> The first TDML test suite binds the variable to 0.
> The second TDML test suite does not bind the variable, but the tests require 
> that the default value of 2 is used.
> Each test suite, run separately works fine.
> When run together the 2nd one fails. It is getting the "0" value that was set 
> for the external variable. 
> Even if you ALSO set the external variable in the 2nd test suite, the bug 
> still occurs. Seemingly because the earlier external variable binding is 
> "winning" for some reason.
> The TDML runner needs to reset state of external variables for each test 
> suite.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (DAFFODIL-2302) TDML Runner remembers external variable bindings even on subsequent test suites that don't use them.

2020-03-29 Thread Mike Beckerle (Jira)


[ 
https://issues.apache.org/jira/browse/DAFFODIL-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17070556#comment-17070556
 ] 

Mike Beckerle commented on DAFFODIL-2302:
-

There are possibly multiple bugs here.

I discovered that in a large schema, there is an element that is referenced in 
expressions, but its DPathElementCompileInfo never gets the 
isReferencedByExpressions var set.

This is supposed to be set for every element referenced by expressions but 
something is slipping through the cracks here.

I will report this as a separate ticket.

 

 

> TDML Runner remembers external variable bindings even on subsequent test 
> suites that don't use them.
> 
>
> Key: DAFFODIL-2302
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2302
> Project: Daffodil
>  Issue Type: Bug
>  Components: TDML Runner
>Affects Versions: 2.5.0
>Reporter: Mike Beckerle
>Assignee: Mike Beckerle
>Priority: Critical
> Fix For: 2.6.0
>
>
> A schema has two separate TDML test suites.
> The schema has an external variable that has a default value of 2.
> The first TDML test suite binds the variable to 0.
> The second TDML test suite does not bind the variable, but the tests require 
> that the default value of 2 is used.
> Each test suite, run separately works fine.
> When run together the 2nd one fails. It is getting the "0" value that was set 
> for the external variable. 
> Even if you ALSO set the external variable in the 2nd test suite, the bug 
> still occurs. Seemingly because the earlier external variable binding is 
> "winning" for some reason.
> The TDML runner needs to reset state of external variables for each test 
> suite.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (DAFFODIL-2302) TDML Runner remembers external variable bindings even on subsequent test suites that don't use them.

2020-03-25 Thread Mike Beckerle (Jira)


[ 
https://issues.apache.org/jira/browse/DAFFODIL-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17067108#comment-17067108
 ] 

Mike Beckerle commented on DAFFODIL-2302:
-

It is actually worse than any of this.

DataProcessor has a setExternalVariables memo. When many tests are running in 
parallel (the default behavior), but they have different external variables 
settings, there is thread-unsafe state modification in the DataProcessor 
happening.

Basically, external variables don't work unless you set them once and for all, 
for all uses of a DataProcessor, all uses of a Compiler.

> TDML Runner remembers external variable bindings even on subsequent test 
> suites that don't use them.
> 
>
> Key: DAFFODIL-2302
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2302
> Project: Daffodil
>  Issue Type: Bug
>  Components: TDML Runner
>Affects Versions: 2.5.0
>Reporter: Mike Beckerle
>Assignee: Mike Beckerle
>Priority: Major
> Fix For: 2.6.0
>
>
> A schema has two separate TDML test suites.
> The schema has an external variable that has a default value of 2.
> The first TDML test suite binds the variable to 0.
> The second TDML test suite does not bind the variable, but the tests require 
> that the default value of 2 is used.
> Each test suite, run separately works fine.
> When run together the 2nd one fails. It is getting the "0" value that was set 
> for the external variable. 
> Even if you ALSO set the external variable in the 2nd test suite, the bug 
> still occurs. Seemingly because the earlier external variable binding is 
> "winning" for some reason.
> The TDML runner needs to reset state of external variables for each test 
> suite.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (DAFFODIL-2302) TDML Runner remembers external variable bindings even on subsequent test suites that don't use them.

2020-03-25 Thread Mike Beckerle (Jira)


[ 
https://issues.apache.org/jira/browse/DAFFODIL-2302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17066685#comment-17066685
 ] 

Mike Beckerle commented on DAFFODIL-2302:
-

This is all snarled up.

SchemaSet has a variableMap lazy val member which loads the external variable 
bindings.

That means you cannot share SchemaSet objects if you have different external 
variable bindings.

Now compilation requires that one have the variable map, so as to know what 
variables exist. But the external bindings of them can change at run-time.

Yet SchemaSet loading the external bindings *once* in a lazy val variable map 
doesn't allow that.

This design point requires that if the external variable bindings change, you 
must recompile the entire schema set. This is unnecessary, and furthermore the 
TDML Processor is *not* doing that. It is caching compiled schema objects 
without taking the external variable bindings into account as a key.

 

> TDML Runner remembers external variable bindings even on subsequent test 
> suites that don't use them.
> 
>
> Key: DAFFODIL-2302
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2302
> Project: Daffodil
>  Issue Type: Bug
>  Components: TDML Runner
>Affects Versions: 2.5.0
>Reporter: Mike Beckerle
>Assignee: Mike Beckerle
>Priority: Major
> Fix For: 2.6.0
>
>
> A schema has two separate TDML test suites.
> The schema has an external variable that has a default value of 2.
> The first TDML test suite binds the variable to 0.
> The second TDML test suite does not bind the variable, but the tests require 
> that the default value of 2 is used.
> Each test suite, run separately works fine.
> When run together the 2nd one fails. It is getting the "0" value that was set 
> for the external variable. 
> Even if you ALSO set the external variable in the 2nd test suite, the bug 
> still occurs. Seemingly because the earlier external variable binding is 
> "winning" for some reason.
> The TDML runner needs to reset state of external variables for each test 
> suite.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)