Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

All flaky tests fixed for the biojava-structure module#1

Open
Shilpa-Rani wants to merge 2 commits into
masterShilpa-Rani/biojava:masterfrom
all-flaky-tests-fixedShilpa-Rani/biojava:all-flaky-tests-fixedCopy head branch name to clipboard
Open

All flaky tests fixed for the biojava-structure module#1
Shilpa-Rani wants to merge 2 commits into
masterShilpa-Rani/biojava:masterfrom
all-flaky-tests-fixedShilpa-Rani/biojava:all-flaky-tests-fixedCopy head branch name to clipboard

Conversation

@Shilpa-Rani

Copy link
Copy Markdown
Owner

Fixed the following Flaky Tests:
' org.biojava.nbio.structure.io.TestMMCIFWriting#test1A2C
org.biojava.nbio.structure.io.TestMMCIFWriting#test1SMT
org.biojava.nbio.structure.io.TestMMCIFWriting#test2N3J
org.biojava.nbio.structure.io.TestMMCIFWriting#testBiounitWriting
org.biojava.nbio.structure.TestStructureSerialization#testSerializeStructure '

This commit fixes all the flaky tests in the biojava-structure module.

The above-mentioned tests fail because of non-determinism caused due to various reasons. Because the order of elements in Array objects("methods" and "fields") is not deterministic, these tests can fail for a different order. Sorting the fields makes these tests pass.
Also, the Oracle specification about HashMap says that “This class makes no guarantees as to the order of the map; in particular, it does not guarantee that the order will remain constant over time.” The documentation is here for your reference:https://docs.oracle.com/javase/8/docs/api/java/util/HashMap.html

So, we have changed it to LinkedHashMap for making the tests execute deterministically.

checkIfValidStrForIntConversion() module is added SimpleMMcifParser to get rid of the bug that still allowed non parsable Integers to be passed to Integer.parseInt().

Shilpa-Rani and others added 2 commits November 20, 2020 21:56
org.biojava.nbio.structure.io.StructureSequenceMatcherTest#testGetProteinSequenceForStructure
org.biojava.nbio.structure.io.TestMMCIFWriting#testBeanAnnotations
org.biojava.nbio.structure.io.FastaAFPChainConverterTest#testFromFasta
org.biojava.nbio.structure.secstruc.TestSecStrucCalc#testMultiModelPred
org.biojava.nbio.structure.secstruc.TestSecStrucCalc#testSecStrucPred
org.biojava.nbio.structure.align.util.AtomCacheTest#testGetStructureForChainlessDomains
org.biojava.nbio.structure.basepairs.TestBasePairParameters#testBasePair
org.biojava.nbio.structure.cluster.TestSubunitCluster#testMergeStructure
org.biojava.nbio.structure.cluster.TestSubunitExtractor#testHistone
org.biojava.nbio.structure.TestParsingCalcium#testCalciumParsing
org.biojava.nbio.structure.AtomPositionMapTest#testChains
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.