-
Notifications
You must be signed in to change notification settings - Fork 10
Fix memory usage and chunkcache #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
d6b2c05
6952825
743151f
0a82893
f499758
ecedd55
35d2da4
52ea90c
bcfb2b9
a632e1f
e6d7ee9
cd5988f
5b1cae7
abb5169
ab3107e
b64bd0d
d5d0b4c
d7da218
c327678
854f750
951fab7
ddd22ad
c97efac
8005e8f
509cf1b
2967f45
21ac55b
acf5f53
b2a43a6
707b3cf
844dbd9
9cc2862
c23163c
e5c2f5f
fe9c89c
6427b1e
fb46122
6a48b75
0c404b3
1ca2cda
6fb653a
517518d
be6551f
1363885
68a1656
f23294f
b8801b2
126fd78
7a8a860
2f3586c
c5c1873
25ce262
5802769
b74a4b1
4c7e53f
6e6af3f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Build & Test | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "**" ] | ||
| pull_request: | ||
| branches: [ "**" ] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Unit Tests | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Set up Java 17 | ||
| uses: actions/setup-java@v4 | ||
| with: | ||
| java-version: '17' | ||
| distribution: 'temurin' | ||
| cache: gradle | ||
|
|
||
| - name: Grant execute permission for gradlew | ||
| run: chmod +x gradlew | ||
|
|
||
| - name: Run tests | ||
| run: ./gradlew test --no-daemon | ||
|
|
||
| - name: Upload test reports | ||
| if: always() | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: test-reports | ||
| path: build/reports/tests/test/ |
|
UplandJacob marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,6 +101,8 @@ public void onDisable() { | |
| } | ||
|
|
||
| PacketEvents.getAPI().terminate(); | ||
|
|
||
| getServer().getMessenger().unregisterIncomingPluginChannel(this); | ||
|
Comment on lines
103
to
+105
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Plugin message registrations:"
rg -n --type=java 'register(Incoming|Outgoing)PluginChannel|unregister(Incoming|Outgoing)PluginChannel' src
echo
echo "Expected: every registerOutgoingPluginChannel(...) has a matching unregisterOutgoingPluginChannel(...) on the disable path."Repository: TuffNetwork/TuffXPlus Length of output: 2239 Fix plugin-channel teardown:
🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| public void reloadTuffX(){ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| package tf.tuff; | ||
|
|
||
| import be.seeseemelk.mockbukkit.MockBukkit; | ||
| import be.seeseemelk.mockbukkit.ServerMock; | ||
| import be.seeseemelk.mockbukkit.entity.PlayerMock; | ||
| import org.junit.jupiter.api.*; | ||
|
|
||
| import static org.junit.jupiter.api.Assertions.*; | ||
|
|
||
| class TuffXTest { | ||
|
Comment on lines
+1
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Test file location:"
fd -p 'TuffXTest.java'
echo
echo "Gradle source-set configuration:"
rg -n 'sourceSets|useJUnitPlatform|test \{' build.gradle settings.gradle gradle.properties 2>/dev/null || true
echo
echo "Expected: either the test file lives under src/test/java/... or build.gradle defines a custom test source set that includes src/test."Repository: TuffNetwork/TuffXPlus Length of output: 340 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "== build.gradle lines 70-120 =="
sed -n '70,120p' build.gradle
echo
echo "== Any sourceSets configuration in repo (limited to build.gradle/gradle/*.gradle) =="
rg -n "sourceSets" -S . || true
echo
echo "== List of Java test files under src/test =="
fd -e java . src/test 2>/dev/null | head -n 200Repository: TuffNetwork/TuffXPlus Length of output: 696 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "Test file location:"
fd -p 'TuffXTest.java'
echo
echo "Gradle source-set configuration:"
rg -n 'sourceSets|sourceDirs|test \{' build.gradle settings.gradle gradle.properties 2>/dev/null || true
echo
echo "Expected: either the test file lives under src/test/java/... or build.gradle defines a custom test source set/sourceDirs including src/test."Repository: TuffNetwork/TuffXPlus Length of output: 308 Move
🤖 Prompt for AI Agents |
||
|
|
||
| private static ServerMock server; | ||
| private static TuffX plugin; | ||
|
|
||
| @BeforeEach | ||
| void setUp() { | ||
| server = MockBukkit.mock(); | ||
| plugin = MockBukkit.load(TuffX.class); | ||
| } | ||
|
|
||
| @AfterEach | ||
| void tearDown() { | ||
| MockBukkit.unmock(); | ||
| } | ||
|
|
||
| @Test | ||
| void pluginEnablesSuccessfully() { | ||
| assertTrue(plugin.isEnabled(), "Plugin should be enabled after load"); | ||
| } | ||
|
|
||
|
|
||
| @Test | ||
| void reloadDoesNotThrow() { | ||
| assertDoesNotThrow(() -> plugin.reloadTuffX(), | ||
| "reloadTuffX() should not throw"); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.