This is an automated email from the ASF dual-hosted git repository.

yangjie01 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/master by this push:
     new 694cc72a71fb [SPARK-53895][SS][TESTS] Add `ContinuousMemorySuite`
694cc72a71fb is described below

commit 694cc72a71fb38848f135d1ef80e1fcc017866b7
Author: Jerry Peng <[email protected]>
AuthorDate: Wed Oct 15 10:35:26 2025 +0800

    [SPARK-53895][SS][TESTS] Add `ContinuousMemorySuite`
    
    ### What changes were proposed in this pull request?
    
    Add a missing test that should have been part of this PR:
    
    https://github.com/apache/spark/pull/52550
    
    ### Why are the changes needed?
    
    Adding an missed test.
    
    ### Does this PR introduce _any_ user-facing change?
    
    No
    
    ### How was this patch tested?
    
    The addition is a test
    
    ### Was this patch authored or co-authored using generative AI tooling?
    
    No
    
    Closes #52602 from jerrypeng/SPARK-53895.
    
    Authored-by: Jerry Peng <[email protected]>
    Signed-off-by: yangjie01 <[email protected]>
---
 .../streaming/sources/ContinuousMemorySuite.scala  | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)

diff --git 
a/sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/sources/ContinuousMemorySuite.scala
 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/sources/ContinuousMemorySuite.scala
new file mode 100644
index 000000000000..c2b479724d62
--- /dev/null
+++ 
b/sql/core/src/test/scala/org/apache/spark/sql/execution/streaming/sources/ContinuousMemorySuite.scala
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package org.apache.spark.sql.execution.streaming.sources
+
+import org.apache.spark.sql.execution.streaming.runtime.MemoryStream
+import org.apache.spark.sql.streaming.{OutputMode, StreamTest}
+
+class ContinuousMemorySuite extends StreamTest {
+  import testImplicits._
+
+  test("basic functionality") {
+    val inputData = MemoryStream[Int]
+    val mapped = inputData.toDS().map(_ + 1)
+
+    testStream(mapped, OutputMode.Append, Map.empty, new 
ContinuousMemorySink())(
+      AddData(inputData, 1, 2, 3),
+      StartStream(),
+      CheckAnswer(2, 3, 4),
+      AddData(inputData, 4, 5, 6),
+      CheckAnswer(2, 3, 4, 5, 6, 7),
+      AddData(inputData, 7),
+      CheckAnswer(2, 3, 4, 5, 6, 7, 8),
+      StopStream,
+      AddData(inputData, 10, 11),
+      StartStream(),
+      CheckAnswer(2, 3, 4, 5, 6, 7, 8, 11, 12))
+  }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to