You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by tk...@apache.org on 2026/10/19 08:58:26 UTC

(incubator-kie) branch main updated: [incubator-kie#7187] Copilot instruction for ksession.dispose in drools unit tests (#7200)

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

tkobayas pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-kie.git


The following commit(s) were added to refs/heads/main by this push:
     new 3df842333fd [incubator-kie#7187] Copilot instruction for ksession.dispose in drools unit tests (#7200)
3df842333fd is described below

commit 3df842333fd86aaa103fa8f60adb6b5eeca6362b
Author: Toshiya Kobayashi <to...@gmail.com>
AuthorDate: Mon Oct 19 17:58:21 2026 +0900

    [incubator-kie#7187] Copilot instruction for ksession.dispose in drools unit tests (#7200)
---
 .github/instructions/drools-tests.instructions.md | 31 +++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/.github/instructions/drools-tests.instructions.md b/.github/instructions/drools-tests.instructions.md
new file mode 100644
index 00000000000..3d94e2da534
--- /dev/null
+++ b/.github/instructions/drools-tests.instructions.md
@@ -0,0 +1,31 @@
+---
+applyTo: "drools-*/**/src/test/**/*.java,kie-ci/**/src/test/**/*.java"
+---
+<!--
+  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.
+  -->
+
+# Drools Unit Test Code Review Guidelines
+
+- In Drools unit tests, it is acceptable to omit `KieSession.dispose()`.
+  Do not flag missing `dispose()` calls on `KieSession` in these tests.
+  This is an intentional project convention because test sessions are
+  typically short-lived and explicit disposal is generally unnecessary
+  in this context (see apache/incubator-kie#7187).
+- Tests that explicitly verify disposal behavior or resource release
+  may still call `dispose()`. Do not flag these calls.
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org