Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mukta13 authored and wenshao committed Oct 17, 2024
1 parent b4e69f9 commit 949c422
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
import com.alibaba.fastjson2.filter.PropertyPreFilter;
import org.junit.jupiter.api.Test;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class Issue2672 {
@Test
public void test() {
Map<String, Object> map = new HashMap<>();
map.put("k", "v");
Map<String, Object> map = new LinkedHashMap<>();
map.put("selfRef", map);
map.put("k", "v");
assertEquals("{\"selfRef\":{\"$ref\":\"..\"},\"k\":\"v\"}",
JSON.toJSONString(map, JSONWriter.Feature.ReferenceDetection));

Expand Down

0 comments on commit 949c422

Please sign in to comment.