mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
Change from MD5 to Checksum (Adler32) for json content dirty detection
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package io.ebeaninternal.server.util;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
public class ChecksumTest {
|
||||
|
||||
@Test
|
||||
public void checksum() {
|
||||
|
||||
final long val = Checksum.checksum("Hello world");
|
||||
assertThat(val).isEqualTo(413860925L);
|
||||
|
||||
assertThat(Checksum.checksum("Hello world")).isEqualTo(val);
|
||||
assertThat(Checksum.checksum("hello world")).isNotEqualTo(val);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user