free2create commented on a change in pull request #11752:
URL: https://github.com/apache/kafka/pull/11752#discussion_r808258300



##########
File path: 
streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
##########
@@ -1094,29 +1095,37 @@ private void throwIfBuiltInStore(final StateStore 
stateStore) {
      * Close the driver, its topology, and all processors.
      */
     public void close() {
-        if (task != null) {
-            task.suspend();
-            task.prepareCommit();
-            task.postCommit(true);
-            task.closeClean();
-        }
-        if (globalStateTask != null) {
-            try {
-                globalStateTask.close(false);
-            } catch (final IOException e) {
-                // ignore
+        try {
+            if (task != null) {
+                task.suspend();
+                task.prepareCommit();
+                task.postCommit(true);
+                task.closeClean();
+            }
+            if (globalStateTask != null) {
+                try {
+                    globalStateTask.close(false);
+                } catch (final IOException e) {
+                    // ignore
+                }
+            }
+            completeAllProcessableWork();
+            if (task != null && task.hasRecordsQueued()) {
+                log.warn("Found some records that cannot be processed due to 
the" +
+                                " {} configuration during 
TopologyTestDriver#close().",
+                        StreamsConfig.MAX_TASK_IDLE_MS_CONFIG);
+            }
+            if (processingMode == AT_LEAST_ONCE) {
+                producer.close();
+            }
+            stateDirectory.clean();
+        } catch (final RuntimeException rex) {
+            if (OperatingSystem.IS_WINDOWS) {
+                log.warn("Ignoring exception for windows, issue may be similar 
to resolved issue: https://issues.apache.org/jira/browse/KAFKA-6647";, rex);
+            } else {

Review comment:
       Done, I reverted change to TestDriver so errors just occur. It is also 
one less Windows OS test in framework,




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to