luomh0910 commented on code in PR #13618:
URL: https://github.com/apache/gluten/pull/13618#discussion_r4708158715


##########
gluten-core/src/test/scala/org/apache/spark/memory/GlobalOffHeapDynamicSizingSuite.scala:
##########
@@ -0,0 +1,162 @@
+/*
+ * 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.memory
+
+import org.apache.gluten.config.GlutenCoreConfig
+import org.apache.gluten.memory.memtarget.{DynamicOffHeapSizingMemoryTarget, 
MemoryTargets}
+
+import org.apache.spark.{SparkConf, SparkEnv}
+import org.apache.spark.sql.internal.SQLConf
+import org.apache.spark.storage.BlockManager
+import org.apache.spark.storage.memory.MemoryStore
+
+import org.mockito.Mockito.{mock, when}
+import org.scalatest.funsuite.AnyFunSuite
+
+/**
+ * Covers how the global (non-task) off-heap reservations pick their backing 
memory pool when
+ * dynamic off-heap sizing is on.
+ *
+ * The suite deliberately runs *without* an active SQL session, because that 
is the situation of the
+ * thread that builds the global memory target in production: the Gluten 
plugin initializes it from
+ * the driver/executor plugin callback, long before any SparkSession is 
attached to the thread. A
+ * conf lookup that falls back to SQLConf defaults there would silently read 
"disabled" and leave
+ * the global target half-wired - charging the on-heap pools from one place 
while the dynamic-sizing
+ * ledger is bypassed in another.
+ */
+class GlobalOffHeapDynamicSizingSuite extends AnyFunSuite {

Review Comment:
   I added org.apache.spark.memory to group 1 of each Spark UT job in 
velox_backend_x86.yml, so these suites are included in Velox PR CI.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to