Repository: cayenne Updated Branches: refs/heads/master 9d2097736 -> bd38bad4a
fix DbImportActionTest.testNewDataMapImport failures Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/02ab8df2 Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/02ab8df2 Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/02ab8df2 Branch: refs/heads/master Commit: 02ab8df2c83e7535a8bfa31d59d2a38ca6852582 Parents: a6b55f7 Author: kolonitsky <[email protected]> Authored: Tue May 5 00:28:51 2015 +0300 Committer: kolonitsky <[email protected]> Committed: Tue May 5 00:28:51 2015 +0300 ---------------------------------------------------------------------- .../cayenne/datafactory/ValueProvider.java | 40 ++++++++++---------- .../cayenne/merge/builders/DbEntityBuilder.java | 6 ++- 2 files changed, 25 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/02ab8df2/cayenne-server/src/test/java/org/apache/cayenne/datafactory/ValueProvider.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/test/java/org/apache/cayenne/datafactory/ValueProvider.java b/cayenne-server/src/test/java/org/apache/cayenne/datafactory/ValueProvider.java index e93bda7..3c02899 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/datafactory/ValueProvider.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/datafactory/ValueProvider.java @@ -383,28 +383,28 @@ public interface ValueProvider<T> { @Override public String[] values() { return new String[]{"throw", "ball", "hat", "red", "worn", - "list", "words", "computer", "in", "out", "hot", "cold", "warp", - "speed", "captain", "assert", "hold", "room", "ship", "lost", "is", - "television", "show", "about", "plane", "crash", "island", - "monster", "trees", "banging", "smoke", "where", "are", "we", - "was", "asked", "no", "rescue", "came", "build", "fire", "waited", - "days", "moved", "to", "caves", "found", "with", "ghost", "dad", - "in", "white", "rabbit", "lock", "discovered", "hatch", "with", - "boon", "secretly", "hid", "it", "while", "trying", "to", "open", - "it", "until", "sidekick", "died", "as", "sacrifice", "island", + "list", "words", "computer", "out", "hot", "cold", "warp", + "speed", "captain", "assert", "hold", "ship", "lost", + "television", "show", "about", "plane", "crash", "monster", "trees", "banging", "smoke", + "where", "we", + "was", "asked", "no", "rescue", "build", "fire", "waited", + "days", "moved", "caves", "found", "ghost", "dad", + "white", "rabbit", "lock", "discovered", "hatch", "with", + "boon", "secretly", "hid", "while", "trying", "open", + "until", "sidekick", "died", "as", "sacrifice", "island", "demanded", "many", "had", "dreams", "or", "visions", "others", - "came", "took", "people", "who", "are", "they", "what", "do", - "they", "want", "light", "came", "on", "through", "window", - "leader", "is", "a", "good", "man", "numbers", "in", "room", - "enter", "keys", "computer", "end", "of", "world", "wicket", + "came", "took", "people", "who", "are", "do", + "they", "want", "light", "on", "through", "window", + "leader", "is", "good", "man", "numbers", "in", "room", + "enter", "keys", "end", "of", "world", "wicket", "magnetic", "pull", "shepherd", "always", "wrong", "much", - "suspense", "what", "to", "do", "when", "it", "ends", "I", "will", - "have", "to", "find", "something", "else", "to", "pique", "my", - "interest", "or maybe", "write", "lots", "of", "code", "probably", - "should", "have", "generated", "this", "text", "automatically", - "so", "will", "from", "the", "web", "ending", "badly", "library", - "handled", "books", "constantly", "headphones", "of", "ill", "on", - "it's", "sill", "sits", "sofa"}; + "suspense", "what", "when", "it", "ends", + "have", "to", "find", "something", "else", "pique", "my", + "interest", "write", "lots", "code", "probably", + "should", "generated", "this", "text", "automatically", + "so", "will", "from", "web", "ending", "badly", "library", + "handled", "books", "constantly", "headphones", "ill", + "sill", "sits", "sofa"}; } }; http://git-wip-us.apache.org/repos/asf/cayenne/blob/02ab8df2/cayenne-server/src/test/java/org/apache/cayenne/merge/builders/DbEntityBuilder.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/test/java/org/apache/cayenne/merge/builders/DbEntityBuilder.java b/cayenne-server/src/test/java/org/apache/cayenne/merge/builders/DbEntityBuilder.java index e0e4b7e..9cbd456 100644 --- a/cayenne-server/src/test/java/org/apache/cayenne/merge/builders/DbEntityBuilder.java +++ b/cayenne-server/src/test/java/org/apache/cayenne/merge/builders/DbEntityBuilder.java @@ -59,7 +59,11 @@ public class DbEntityBuilder extends DefaultBuilder<DbEntity> { public DbEntityBuilder attributes(int numberUpTo) { for (int i = 0; i < numberUpTo; i++) { - obj.addAttribute(new DbAttributeBuilder().random()); + try { + obj.addAttribute(new DbAttributeBuilder().random()); + } catch (IllegalArgumentException e) { + i--; // try again + } } return this;
