Attempt fix at custom serializer race condition
parent
016c0e8afe
commit
b874696c64
|
@ -105,46 +105,6 @@
|
|||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-shade-plugin</artifactId>
|
||||
<version>${maven-shade-plugin.version}</version>
|
||||
<configuration>
|
||||
<shadedArtifactAttached>true</shadedArtifactAttached>
|
||||
<createDependencyReducedPom>false</createDependencyReducedPom>
|
||||
<filters>
|
||||
<filter>
|
||||
<artifact>*:*</artifact>
|
||||
<excludes>
|
||||
<exclude>org/datanucleus/**</exclude>
|
||||
<exclude>META-INF/*.SF</exclude>
|
||||
<exclude>META-INF/*.DSA</exclude>
|
||||
<exclude>META-INF/*.RSA</exclude>
|
||||
</excludes>
|
||||
</filter>
|
||||
</filters>
|
||||
|
||||
</configuration>
|
||||
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>shade</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<transformers>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
|
||||
<resource>reference.conf</resource>
|
||||
</transformer>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
||||
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" />
|
||||
</transformers>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
package org.nd4j.linalg.dataset;
|
||||
|
||||
import lombok.Getter;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -65,12 +66,12 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
|||
@NativeTag
|
||||
@Tag(TagNames.FILE_IO)
|
||||
public class NormalizerSerializerTest extends BaseNd4jTestWithBackends {
|
||||
@TempDir File tmpFile;
|
||||
private NormalizerSerializer SUT;
|
||||
@TempDir File tmpFile;
|
||||
private static NormalizerSerializer SUT;
|
||||
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() throws IOException {
|
||||
@BeforeAll
|
||||
public static void setUp() throws IOException {
|
||||
SUT = NormalizerSerializer.getDefault();
|
||||
}
|
||||
|
||||
|
@ -298,7 +299,6 @@ public class NormalizerSerializerTest extends BaseNd4jTestWithBackends {
|
|||
public void testCustomNormalizerWithoutRegisteredStrategy(Nd4jBackend backend) throws Exception {
|
||||
assertThrows(RuntimeException.class, () -> {
|
||||
File normalizerFile = Files.createTempFile(tmpFile.toPath(),"pre-process-" + UUID.randomUUID().toString(),"bin").toFile();
|
||||
|
||||
SUT.write(new MyNormalizer(123), normalizerFile);
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue