-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #175 from grafana/cleanup
fix: Minor QoL clean up
- Loading branch information
Showing
7 changed files
with
37 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
/.idea/ | ||
/.vscode/ | ||
|
||
# Ignore Gradle project-specific cache directory | ||
.gradle | ||
|
1 change: 0 additions & 1 deletion
1
agent/src/main/java/io/pyroscope/javaagent/impl/PyroscopeExporter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
async-profiler-context/src/test/java/io/pyroscope/labels/RefTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package io.pyroscope.labels; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
import static org.junit.jupiter.api.Assertions.assertTrue; | ||
|
||
public class RefTest { | ||
@Test | ||
void testCreateRef() { | ||
Ref<String> ref = new Ref<>("test", 1L); | ||
assertEquals("test", ref.val); | ||
assertEquals(1L, ref.id); | ||
assertEquals(1L, ref.refCount.get()); | ||
} | ||
|
||
@Test | ||
@SuppressWarnings("unlikely-arg-type") | ||
void testEquals() { | ||
Ref<String> ref1 = new Ref<>("test", 1L); | ||
assertTrue(ref1.equals(ref1)); | ||
assertFalse(ref1.equals(null)); | ||
assertFalse(ref1.equals(new Integer(3))); | ||
assertTrue(ref1.equals(new Ref<Integer>(3, 1L))); // We don't compare the value types. | ||
} | ||
|
||
@Test | ||
void testHashCode() { | ||
Ref<String> ref1 = new Ref<>("test", 1L); | ||
assertEquals(1, ref1.hashCode()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters