The test I implemented in https://github.com/gradle/test-retry-gradle-plugin/commit/16a68b834062ff1b11431281b537746d94653cf3 was not set up correctly to assert this behavior. All nested classes were retried because the top-level class itself had a failure and matched the retry filter. If the enclosing class did not have any method failures, then we wouldn't check if it matches the class retry filter.
With this change, we check if one of the parent classes matches the class-retry filter, and if so, retry it together with all of its nested classes.
Summary
The test I implemented in https://github.com/gradle/test-retry-gradle-plugin/commit/16a68b834062ff1b11431281b537746d94653cf3 was not set up correctly to assert this behavior. All nested classes were retried because the top-level class itself had a failure and matched the retry filter. If the enclosing class did not have any method failures, then we wouldn't check if it matches the class retry filter.
With this change, we check if one of the parent classes matches the class-retry filter, and if so, retry it together with all of its nested classes.